git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] git-submodule enhancements
@ 2008-03-13 17:56 Ping Yin
  2008-03-13 17:56 ` [PATCH 1/7] git-submodule: Avoid 'fatal: cannot describe' message Ping Yin
  2008-03-13 18:16 ` [PATCH 0/7] git-submodule enhancements Ping Yin
  0 siblings, 2 replies; 11+ messages in thread
From: Ping Yin @ 2008-03-13 17:56 UTC (permalink / raw)
  To: git; +Cc: gitster

This patch series do following enhancements for git-submodule

  - Fall back on .gitmodules if info not found in $GIT_DIR/config
  - multi-level module definition
  - Don't die when command fails for one submodule 

with diffstat

 git-submodule.sh           |  316 +++++++++++++++++++++++++++++++-------------
 t/t7400-submodule-basic.sh |   31 ++++-

and commits

      git-submodule: Avoid 'fatal: cannot describe' message
      git-submodule: Extract functions module_info and module_url
      git-submodule: Extract absolute_url & move absolute url logic to module_clone
      git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/config
      git-submodule: Extract module_add from cmd_add
      git-submodule: multi-level module definition
      git-submodule: Don't die when command fails for one submodule

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/7] submodule: fallback to .gitmodules and multiple level module definition
@ 2008-04-16 14:19 Ping Yin
  2008-04-16 14:19 ` [PATCH 1/7] git-submodule: Extract functions module_info and module_url Ping Yin
  0 siblings, 1 reply; 11+ messages in thread
From: Ping Yin @ 2008-04-16 14:19 UTC (permalink / raw)
  To: git; +Cc: gitster

This is a resend of the RFC patches some days ago, with only minor
code modification and log refinement. Also swap the order of the last
two patches.

Since there is less feedback these days, i don't know much what you
guys think of this patch series. However, i have use this series for a
long time and think personally it is useful when having many submodules. 

So i resend it, and look forward to its acceptance.

This patch series has following functional improvements for submodule

 - Fall back on .gitmodules if info not found in $GIT_DIR/config
 - multi-level module definition
 - Don't die when subcommand fails for one module

 Actually, they seems three independent improvements. But the first two
 improvements are both dependent on the first two refactoring patches
 and the 3rd improvement is dependent on the implementation of the
 first two improvements. So i have to send them in batch.

Patches 1,2,4 is mainly code refactor but the second one also
has some semantic change.

The other patches do the real functional changes.

Ping Yin (7):
      git-submodule: Extract functions module_info and module_url
      git-submodule: Extract absolute_url & move absolute url logic to module_clone
      git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/config
      git-submodule: Extract module_add from cmd_add
      git-submodule: multi-level module definition
      git-submodule: "update --force" to enforce cloning non-submodule
      git-submodule: Don't die when command fails for one submodule

 git-submodule.sh           |  325 ++++++++++++++++++++++++++++++++------------
 t/t7400-submodule-basic.sh |   31 ++++-
 2 files changed, 266 insertions(+), 90 deletions(-)


Following is the diff with former RFC patch series

diff --git a/git-submodule.sh b/git-submodule.sh
index 8bea97a..0ecc4ff 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -354,7 +354,7 @@ cmd_init()
 		exit_status=1 &&
 		continue
 		# Skip already registered paths
-		git config submodule.$name.url && continue
+		test -z "$(git config submodule.$name.url)" || continue
 
 		url=$(absolute_url "$url")
 		git config submodule."$name".url "$url" ||
@@ -442,7 +442,6 @@ cmd_update()
 			}
 		fi
 
-
 		if test "$subsha1" != "$sha1"
 		then
 			(unset GIT_DIR; cd "$path" && git-fetch &&
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index d9b48f7..8b35ff8 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -187,7 +187,7 @@ test_expect_success 'status should be "modified" after submodule reset --hard HE
 	git-submodule status | grep "^+$rev2"
 '
 
-test_expect_success 'update should checkout rev1 when fall back' '
+test_expect_success 'update should checkout rev1 with falling back' '
 	git-config --unset submodule.example.url &&
 	GIT_CONFIG=.gitmodules git config submodule.example.url .subrepo &&
 	git-submodule update init &&

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

end of thread, other threads:[~2008-04-16 14:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13 17:56 [PATCH 0/7] git-submodule enhancements Ping Yin
2008-03-13 17:56 ` [PATCH 1/7] git-submodule: Avoid 'fatal: cannot describe' message Ping Yin
2008-03-13 17:56   ` [PATCH 2/7] git-submodule: Extract functions module_info and module_url Ping Yin
2008-03-13 17:56     ` [PATCH 3/7] git-submodule: Extract absolute_url & move absolute url logic to module_clone Ping Yin
2008-03-13 17:56       ` [PATCH 4/7] git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/config Ping Yin
2008-03-13 17:56         ` [PATCH 5/7] git-submodule: Extract module_add from cmd_add Ping Yin
2008-03-13 17:56           ` [PATCH 6/7] git-submodule: multi-level module definition Ping Yin
2008-03-13 17:56             ` [PATCH 7/7] git-submodule: Don't die when command fails for one submodule Ping Yin
2008-03-14 14:20             ` [PATCH 6/7] git-submodule: multi-level module definition Ping Yin
2008-03-13 18:16 ` [PATCH 0/7] git-submodule enhancements Ping Yin
2008-04-16 14:19 [PATCH 0/7] submodule: fallback to .gitmodules and multiple level module definition Ping Yin
2008-04-16 14:19 ` [PATCH 1/7] git-submodule: Extract functions module_info and module_url Ping Yin
2008-04-16 14:19   ` [PATCH 2/7] git-submodule: Extract absolute_url & move absolute url logic to module_clone Ping Yin
2008-04-16 14:19     ` [PATCH 3/7] git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/config Ping Yin
2008-04-16 14:19       ` [PATCH 4/7] git-submodule: Extract module_add from cmd_add Ping Yin
2008-04-16 14:19         ` [PATCH 5/7] git-submodule: multi-level module definition Ping Yin
2008-04-16 14:19           ` [PATCH 6/7] git-submodule: "update --force" to enforce cloning non-submodule Ping Yin
2008-04-16 14:19             ` [PATCH 7/7] git-submodule: Don't die when command fails for one submodule Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).