{"thread":{"id":"9222","subject":"[PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal","startedAt":"2007-07-25T14:21:51Z","lastAt":"2007-07-25T23:09:57Z","messageCount":2,"participants":["Emil Medve","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48567","messageId":"11853733111502-git-send-email-Emilian.Medve@Freescale.com","threadId":"9222","inReplyTo":null,"subject":"[PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal","fromName":"Emil Medve","fromEmail":"emilian.medve@freescale.com","sentAt":"2007-07-25T14:21:51Z","receivedAt":"2007-07-25T14:21:51Z","isPatch":true,"sender":{"key":"emilian.medve@freescale.com","avatar":null},"body":"As of now a failure to locate the closest tag to a commit (e.g because there is\nno tag in the repository) is handled explicitly by displaying an 'undefined' tag\nerror message. However when git describe fails it will still display an\nundesirable  \"fatal: cannot describe SHA1\" message. This patch hides that\nmessage as git-submodule has an alternative and explicit error handling method\nin place for this situation\n\nSigned-off-by: Emil Medve <Emilian.Medve@Freescale.com>\n---\n git-submodule.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 1f0cb99..3804f18 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -233,7 +233,7 @@ modules_list()\n \t\t\tsay \"-$sha1 $path\"\n \t\t\tcontinue;\n \t\tfi\n-\t\trevname=$(unset GIT_DIR && cd \"$path\" && git describe --tags $sha1)\n+\t\trevname=$(unset GIT_DIR && cd \"$path\" && git describe --tags $sha1 2>/dev/null)\n \t\tset_name_rev \"$path\" \"$sha1\"\n \t\tif git diff-files --quiet -- \"$path\"\n \t\tthen\n-- \n1.5.3.rc2.38.g11308-dirty\n"},{"id":"48608","messageId":"7vfy3ccc6y.fsf@assigned-by-dhcp.cox.net","threadId":"9222","inReplyTo":"11853733111502-git-send-email-Emilian.Medve@Freescale.com","subject":"Re: [PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-25T23:09:57Z","receivedAt":"2007-07-25T23:09:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Emil Medve <Emilian.Medve@Freescale.com> writes:\n\n> As of now a failure to locate the closest tag to a commit (e.g because there is\n> no tag in the repository) is handled explicitly by displaying an 'undefined' tag\n> error message. However when git describe fails it will still display an\n> undesirable  \"fatal: cannot describe SHA1\" message. This patch hides that\n> message as git-submodule has an alternative and explicit error handling method\n> in place for this situation\n>\n> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>\n> ---\n>  git-submodule.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index 1f0cb99..3804f18 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -233,7 +233,7 @@ modules_list()\n>  \t\t\tsay \"-$sha1 $path\"\n>  \t\t\tcontinue;\n>  \t\tfi\n> -\t\trevname=$(unset GIT_DIR && cd \"$path\" && git describe --tags $sha1)\n> +\t\trevname=$(unset GIT_DIR && cd \"$path\" && git describe --tags $sha1 2>/dev/null)\n>  \t\tset_name_rev \"$path\" \"$sha1\"\n>  \t\tif git diff-files --quiet -- \"$path\"\n>  \t\tthen\n\nIt appears that set_name_rev does the moral equivalent of that\nline you touched but more elaborately, to set the same\nvariable.  Shouldn't we be simply removing that line instead?\n"}]}