@matheusbsbs / matheus-bagliano / commits / a68972c2ad
Fork 0

git-submodule: Avoid 'fatal: cannot describe' message

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>

Ping Yin committed Apr 10, 2008 at 22:45 UTC a68972c2ad7c3de582abeed03f660e19950ed66f
1 file changed +1 -1
git-submodule.sh
+1 -1
@@ -327,7 +327,7 @@ set_name_rev () {
327 cd "$1" && {
328 git describe "$2" 2>/dev/null ||
329 git describe --tags "$2" 2>/dev/null ||
330 - git describe --contains --tags "$2"
330 + git describe --contains --tags --always "$2"
331 }
332 ) )
333 test -z "$revname" || revname=" ($revname)"