Skip to content

Commit

Permalink
git-submodule: Avoid 'fatal: cannot describe' message
Browse files Browse the repository at this point in the history
When "git submodule status" command tries to show the name of the
submodule HEAD revision more descriptively, but the submodule
repository lacked a suitable tag to do so, it leaked "fatal: cannot
describe" message to the UI.  Squelch it by using '--always'.

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ping Yin authored and Junio C Hamano committed Apr 12, 2008
1 parent b6309ac commit a68972c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ set_name_rev () {
cd "$1" && {
git describe "$2" 2>/dev/null ||
git describe --tags "$2" 2>/dev/null ||
git describe --contains --tags "$2"
git describe --contains --tags --always "$2"
}
) )
test -z "$revname" || revname=" ($revname)"
Expand Down

0 comments on commit a68972c

Please sign in to comment.