recursive-variant icon indicating copy to clipboard operation
recursive-variant copied to clipboard

Readme Suggestion, Usage & Installation

Open srod5125 opened this issue 8 months ago • 2 comments

Hello,

In the Usage & Installation section of the readme I suggest changing GIT_TAG main to GIT_TAG origin/main.

(Didn't think this warranted a pull request.)

Thanks for the library, works out of the box :thumbsup:

srod5125 avatar Jun 16 '25 00:06 srod5125

Hi @srod5125! Out of curiosity, does this actually make a difference? If FetchContent is downloading a fresh copy of the repository, wouldn't main be identical to origin/main?

codeinred avatar Jun 17 '25 02:06 codeinred

Apparently yes, FetchContent wraps ExternalProject (other citation).

Quoting directly from the GIT_TAG section in ExternalProject.

Git branch name, tag or commit hash. Note that branch names and tags should generally be specified as remote names (i.e. origin/myBranch rather than simply myBranch). This ensures that if the remote end has its tag moved or branch rebased or history rewritten, the local clone will still be updated correctly. In general, however, specifying a commit hash should be preferred for a number of reasons

In otherwords origin/main updates the local copy on every cmake ...

srod5125 avatar Jun 19 '25 04:06 srod5125