Git development
 help / color / mirror / Atom feed
* [PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal
@ 2007-07-25 14:21 Emil Medve
  2007-07-25 23:09 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Medve @ 2007-07-25 14:21 UTC (permalink / raw)
  To: git; +Cc: Emil Medve

As of now a failure to locate the closest tag to a commit (e.g because there is
no tag in the repository) is handled explicitly by displaying an 'undefined' tag
error message. However when git describe fails it will still display an
undesirable  "fatal: cannot describe SHA1" message. This patch hides that
message as git-submodule has an alternative and explicit error handling method
in place for this situation

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 1f0cb99..3804f18 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -233,7 +233,7 @@ modules_list()
 			say "-$sha1 $path"
 			continue;
 		fi
-		revname=$(unset GIT_DIR && cd "$path" && git describe --tags $sha1)
+		revname=$(unset GIT_DIR && cd "$path" && git describe --tags $sha1 2>/dev/null)
 		set_name_rev "$path" "$sha1"
 		if git diff-files --quiet -- "$path"
 		then
-- 
1.5.3.rc2.38.g11308-dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-25 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 14:21 [PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal Emil Medve
2007-07-25 23:09 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox