DORMANTno replies

[PATCH] git-submodule - possibly use remote branch to describe a module

From: Mark Levedahl <hidden>
Date: 2016-06-15 22:44:29
Subsystem: the rest · Maintainer: Linus Torvalds

Absent user intervention, git-submodule will maintain submodules as
headless checkouts of remote branches: such checkouts cannot be described
with reference to any local branch. So, allow describing the submodule
using remote branches before falling back on just using the commit id.

Signed-off-by: Mark Levedahl <redacted>
---
 git-submodule.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 28509ea..af195a7 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -389,7 +389,8 @@ set_name_rev () {
 		cd "$1" && {
 			git describe "$2" 2>/dev/null ||
 			git describe --tags "$2" 2>/dev/null ||
-			git describe --contains --tags --always "$2"
+			git describe --contains "$2" 2>/dev/null ||
+			git describe --all --always "$2"
 		}
 	) )
 	test -z "$revname" || revname=" ($revname)"
-- 
1.5.5.65.gf482
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help