Git development
 help / color / mirror / Atom feed
* [PATCH] git-submodule: Instead of using only annotated tags, use any tag found in .git/refs/tags
@ 2007-06-26 23:40 Emil Medve
  2007-06-27  6:15 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Emil Medve @ 2007-06-26 23:40 UTC (permalink / raw)
  To: git; +Cc: Emil Medve

Some repositories might not use/have annotated tags (for example repositories created with
git-cvsimport) and git-submodule status might fail because git-describe might fail to find a tag.
This change allows the status of a submodule to be described/displayed relative to lightweight tags
as well.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 89a3885..56ea935 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -155,7 +155,7 @@ modules_list()
 			say "-$sha1 $path"
 			continue;
 		fi
-		revname=$(unset GIT_DIR && cd "$path" && git-describe $sha1)
+		revname=$(unset GIT_DIR && cd "$path" && git-describe --tags $sha1)
 		if git diff-files --quiet -- "$path"
 		then
 			say " $sha1 $path ($revname)"
@@ -163,7 +163,7 @@ modules_list()
 			if test -z "$cached"
 			then
 				sha1=$(unset GIT_DIR && cd "$path" && git-rev-parse --verify HEAD)
-				revname=$(unset GIT_DIR && cd "$path" && git-describe $sha1)
+				revname=$(unset GIT_DIR && cd "$path" && git-describe --tags $sha1)
 			fi
 			say "+$sha1 $path ($revname)"
 		fi
-- 
1.5.2.2.549.gaeb59

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

end of thread, other threads:[~2007-06-28  5:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-26 23:40 [PATCH] git-submodule: Instead of using only annotated tags, use any tag found in .git/refs/tags Emil Medve
2007-06-27  6:15 ` Junio C Hamano
2007-06-27 12:20   ` Medve Emilian-EMMEDVE1
2007-06-28  5:27     ` Shawn O. Pearce

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