[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] New git-hash.sh script
On 04.01.2012 00:31, Eric Eide wrote:
> > Commit: c228c1c52e22f55b90fb8a2ceaccf534f96543b7
> > Author: Eric Eide <email@example.com>
> > Date: 2012-01-03 (Tue, 03 Jan 2012)
> > Use new `git-hash.sh' script to find the current commit hash.
> Let me mention that this script is designed to address a version-tracking
> problem we've had until now: that the current Git commit hash was "forgotten"
> whenever one built from something other than a Git repository.
> Now, "git export" burns the current commit into `git-hash.sh'. This means that
> if someone downloads a zipfile/tarball from GitHub, the hash is burned into the
> zipfile/tarball that he or she downloads. It also means that the commit hash
> can be burned into our "official" release zip/tar files (assuming they are
> produced from a Git export!).
Just a suggestion: You could use git-describe (instead of git-show) in
To copy your current behavior use:
$ git describe --match ''
But you could also include the most recent tag. For example the current
$ git describe
outputs "csmith-2.1.0-18-gc228c1c", which is read as "this is tag
csmith-2.1.0 plus 18 more commits with hash gc228c1c".
Karlsruhe Institute of Technology (KIT)
Institut für Programmstrukturen und Datenorganisation (IPD)
Lehrstuhl Prof. Snelting
Phone: +49 721 608 48351
Fax: +49 721 608 48457
KIT – University of the State of Baden-Wuerttemberg and
National Research Center of the Helmholtz Association