Thomas Braun
2014-10-16 13:34:29 UTC
Hi,
I've encountered an oddity with git describe.
Consider the following snippet:
-----
mkdir test
cd test
git init
echo 1 > file
git add file
git commit -m "changes"
$ git describe --always --dirty
8ad486e
$ cd ..
$ git --git-dir=test/.git describe --always --dirty
8ad486e-dirty
$ GIT_DIR=test/.git git describe --always --dirty
8ad486e-dirty
-----
The "-dirty" suffix appears if invoking git not from the worktree
itself, but should actually never appear.
According to my research this behaviour is there since 9f67d2e8 (Teach
"git describe" --dirty option, 2009-10-27).
Is that to expected?
Thanks
Thomas
I've encountered an oddity with git describe.
Consider the following snippet:
-----
mkdir test
cd test
git init
echo 1 > file
git add file
git commit -m "changes"
$ git describe --always --dirty
8ad486e
$ cd ..
$ git --git-dir=test/.git describe --always --dirty
8ad486e-dirty
$ GIT_DIR=test/.git git describe --always --dirty
8ad486e-dirty
-----
The "-dirty" suffix appears if invoking git not from the worktree
itself, but should actually never appear.
According to my research this behaviour is there since 9f67d2e8 (Teach
"git describe" --dirty option, 2009-10-27).
Is that to expected?
Thanks
Thomas