inconsistency with --abbrev=0
The minimum (>=4) number of chars is shown by
git log|show|whatchanged --abbrev-commit --raw --abbrev=0 git rev-list --abbrev-commit --abbrev=0 HEAD git show-ref --abbrev=0 and the various diff commands
All 40 are shown by
git branch -v --abbrev=0 git ls-files --stage --abbrev=0 git ls-tree --abbrev=0 HEAD
The latter group uses parse-options and doesn't set abbrev to 4 in this case. This is needed for git-describe to omit the output of the commit.
What should --abbrev=0 behave like?
Markus
Heya,
Quoted 1 line · Markus Heidelberg
What should --abbrev=0 behave like?
If the minimum is 4, then --abbrev=n with n < 4 should give an error saying that it should be >= 4, no?
Signature · 3 lines
Cheers, Sverre Rabbelier
Sverre Rabbelier, 31.05.2009:
Quoted 8 lines
Heya,
Quoted 1 line · Markus Heidelberg
What should --abbrev=0 behave like?
If the minimum is 4, then --abbrev=n with n < 4 should give an error saying that it should be >= 4, no?
This would break existing workflows. Currently --abbrev=[1-3] (and also --abbrev=-n (negative numbers)) always display >=4 chars in all commands. So you don't have to remind git's lower limit of 4, if you just want to display as few chars as possible.
Only --abbrev=0 is different.
Markus