All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Bertogli <albertito@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Alberto Bertogli <albertito@gmail.com>
Subject: [PATCH] Fix "git submodule status" output when "git describe" is not possible
Date: Tue, 12 Feb 2008 22:19:46 -0200	[thread overview]
Message-ID: <1202861986-1159-1-git-send-email-albertito@gmail.com> (raw)

When a submodule cannot be described, doing a "git submodule status" on
the supermodule produces unnecesary and scary output, for example:

    fatal: cannot describe 'cac575f1bccf0c6942d11962cf4d44ba974d3e8e'
     cac575f1bccf0c6942d11962cf4d44ba974d3e8e megaco/megaco_tipc

Where it should just show:

     cac575f1bccf0c6942d11962cf4d44ba974d3e8e megaco/megaco_tipc

The culprit (after manual inspection of git log) seems to be commit
a2cf9f4.

This patch fixes this by making git submodule aware of that behaviour
change.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index a6aaf40..5e8b84f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -315,7 +315,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 "$2" 2>/dev/null
 		}
 	) )
 	test -z "$revname" || revname=" ($revname)"
-- 
1.5.4.1.1279.g0d205f-dirty

             reply	other threads:[~2008-02-13  0:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13  0:19 Alberto Bertogli [this message]
2008-02-13  1:01 ` [PATCH] Fix "git submodule status" output when "git describe" is not possible Junio C Hamano
2008-02-24 20:49   ` Alberto Bertogli

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=1202861986-1159-1-git-send-email-albertito@gmail.com \
    --to=albertito@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.