From: Junio C Hamano <gitster@pobox.com>
To: Emil Medve <Emilian.Medve@Freescale.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-submodule: Error messages from 'git describe' shouldn't end up on the terminal
Date: Wed, 25 Jul 2007 16:09:57 -0700 [thread overview]
Message-ID: <7vfy3ccc6y.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <11853733111502-git-send-email-Emilian.Medve@Freescale.com> (Emil Medve's message of "Wed, 25 Jul 2007 09:21:51 -0500")
Emil Medve <Emilian.Medve@Freescale.com> writes:
> 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
It appears that set_name_rev does the moral equivalent of that
line you touched but more elaborately, to set the same
variable. Shouldn't we be simply removing that line instead?
prev parent reply other threads:[~2007-07-25 23:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfy3ccc6y.fsf@assigned-by-dhcp.cox.net \
--to=gitster@pobox.com \
--cc=Emilian.Medve@Freescale.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox