Remove misleading $Id$
embedded into version string
#121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
$Id$
which can be auto-expanded in files via theident
attribute does not function the same as the old CVS
$Id$
keyword.In CVS, the keyword expansion was updated on every commit, to contain
the current commit id. In git, it is expanded with the identifier of
the blob it is found in. That is, previous to this commit, the
$Id$
(and hence the reported "version hash") wasf220e479c5d8d85c7b753e95dc5fe0b67bbfbd38 -- and had been since the
file was changed last, in f386360.
Remove the misleading hash, and attendant git attributes file. It
will frequently mislead callers that the version has not changed
when, in reality, it has.
Git itself does not have a way to embed "the current commit hash" into
a file in a way that is updated whenever the commit changes. Nor does
Go natively have a way to embed it into the binary at build time,
though this may change in the future[1].
As alluded to in that ticket, most projects elect to pass in the
build-time commit information via something like:
However, smokescreen does not currently have any build system external
to
go build
which could embed the above logic. Rather than choose abuild system and introduce a new dependency, remove the misleading
hash entirely.
[1] golang/go#37475 and also
golang/go#29228