Re: git-describe recognize modified files
- From
Andreas Krey <a.krey@gmx.de>
- Date
- Jan 19, 2010, 12:21 UTC
- Message-ID
- <20100119122122.GA28667@inner.home.ulmdo.de>
- In-Reply-To
- <alpine.DEB.1.00.1001191134130.3164@intel-tinevez-2-302>
On Tue, 19 Jan 2010 11:35:41 +0000, Johannes Schindelin wrote: ...
Show 6 quoted lines
> > To solve this issue, in addition to git-describe, my do_version script > > also run git-status, and if there are "modified:" files then it > > concatenates the string "+dirty" to output of git-describe. > > The problem is that this does not describe the exact version you used very > well.
I (and probably the original poster) don't care that much; for me the important information is that the binary (or whatever) was not built from the exact committed state. Thus the question is whether the second two lines of
BUILDINFO=git-`git describe --abbrev=16 --always HEAD 2>/dev/null` git update-index -q --refresh test -z "`git diff-index --name-only HEAD --`" || BUILDINFO="$BUILDINFO.dirty"
(after GIT-VERSION-GEN) are worth to be integrated into git-describe?
(And whether it should also say '.dirty' when there are untracked files present. Or either for submodules.)
Andreas