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
$si_file_hash is referenced before it is set, so anyone using @file-revision@ in a git repository would actually be getting the file-revision of the file that was processed before it.
Pretty sure the fix is just swapping the lines. Happy to do that if you want!
Though in the Wiki (emphasis mine):
@file-revision@
Turns into the current revision of the file in integer form. e.g. 1234
Note: For Git, this will use the file hash.
So should the lines be swapped andsi_file_revision=$si_file_hash to match what the Wiki says? Or is "this will use the file hash" truly literal in that the hash is used to determine the revision. The script has this comment instead: Turns into the commit count for the file's hash for Git.
I'm not familiar with SVN, but since the SVN logic for si_file_revision is awk'd off Last Changed Rev: - I think the file hash (the commit SHA in which the file was last changed) makes the most sense in this case.
Thanks to all the contributors who have worked on this! Super useful tool!
The text was updated successfully, but these errors were encountered:
I know that file-revision is more of a SVN paradigm, but as I was looking through the code I noticed:
$si_file_hash
is referenced before it is set, so anyone using@file-revision@
in a git repository would actually be getting the file-revision of the file that was processed before it.Pretty sure the fix is just swapping the lines. Happy to do that if you want!
Though in the Wiki (emphasis mine):
So should the lines be swapped and
si_file_revision=$si_file_hash
to match what the Wiki says? Or is "this will use the file hash" truly literal in that the hash is used to determine the revision. The script has this comment instead:Turns into the commit count for the file's hash for Git.
I'm not familiar with SVN, but since the SVN logic for
si_file_revision
is awk'd offLast Changed Rev:
- I think the file hash (the commit SHA in which the file was last changed) makes the most sense in this case.Thanks to all the contributors who have worked on this! Super useful tool!
The text was updated successfully, but these errors were encountered: