Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

From: W. Trevor King <hidden>
Date: 2016-06-15 22:55:13

On Fri, Nov 09, 2012 at 02:46:07AM -0800, Matt Kraai wrote:
On Thu, Nov 08, 2012 at 10:35:12PM -0500, W. Trevor King wrote:
quoted
@@ -366,6 +379,10 @@ Use -f if you really want to add it." >&2
 
 	git config -f .gitmodules submodule."$sm_path".path "$sm_path" &&
 	git config -f .gitmodules submodule."$sm_path".url "$repo" &&
+	if test -n "$branch"
+	then
+		git config -f .gitmodules submodule."$sm_path".branch "$record_branch"
+	fi &&
 	git add --force .gitmodules ||
 	die "$(eval_gettext "Failed to register submodule '\$sm_path'")"
 }
Should the if condition test that $record_branch is not the empty
string instead of testing that $branch is not the empty string?  It
seems like this will set submodule."$sm_path".branch to the empty
string if -b is specified and no -r option is specified.
Oops, thanks for catching that.  Will fix with v4, once we figure out
what to do about the semantic-pull situation.

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help