author | Junio C Hamano <gitster@pobox.com> | |
Sun, 2 Mar 2008 16:51:57 +0000 (08:51 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 3 Mar 2008 08:52:17 +0000 (00:52 -0800) | ||
commit | da2478dbb000436b79e813ba7f243d6042f26e66 | |
tree | 795780a338f1e4ad737083f012cf870ef246157a | tree | snapshot |
parent | 34cd62eb91600109378c8121c1fecd924a9af177 | commit | diff |
describe --always: fall back to showing an abbreviated object name
Some callers may find it useful if "git describe" always gave back a
string that can be used as a shorter name for a commit object, rather than
checking its exit status (while squelching its error message, which could
potentially talk about more grave errors that should not be squelched) and
implementing a fallback themselves.
This teaches describe/name-rev a new option, --always, to use an
abbreviated object name when no tags or refs to use is found.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some callers may find it useful if "git describe" always gave back a
string that can be used as a shorter name for a commit object, rather than
checking its exit status (while squelching its error message, which could
potentially talk about more grave errors that should not be squelched) and
implementing a fallback themselves.
This teaches describe/name-rev a new option, --always, to use an
abbreviated object name when no tags or refs to use is found.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-describe.c | diff | blob | history | |
builtin-name-rev.c | diff | blob | history |