You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use this to generate a single file that contain my current version on the branch as a way to give version information to a website.
I use the $Name$
and i get that when i switch from one branch to another - the file gets filled with the information of the branch i am leaving - instead of the branch i am checking out (i get the wrong tag name and the wrong commit hash)
The text was updated successfully, but these errors were encountered:
I am unable to reproduce this behavior, however in debugging I ran into something else, which might be what you're getting at:
The problem is that even if your branch tag points to abcdef, the file has not changed.
For example, if you check the current commit with
git describe --always --tag
and then check out the log for a file:
git log file
If a file was not included in the most recent commit, it does not have a log entry for that commit, but instead uses the most recent one found. It does reflect the status of that file properly (And mimics CVS conventions in this way, which is actually what I intended to do).
SOLUTION:
Use $Commit$ instead (That shows that commit hash of the checkout, not the specific file)
I tried to use this to generate a single file that contain my current version on the branch as a way to give version information to a website.$Name$
I use the
and i get that when i switch from one branch to another - the file gets filled with the information of the branch i am leaving - instead of the branch i am checking out (i get the wrong tag name and the wrong commit hash)
The text was updated successfully, but these errors were encountered: