Re: [PATCH v4 3/6] submodule: Explicit local branch creation in module_clone

2014-01-16 Thread W. Trevor King
On Thu, Jan 16, 2014 at 11:43:44AM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > > @@ -817,11 +831,15 @@ cmd_update() > > > > displaypath=$(relative_path "$prefix$sm_path") > > > > - if test "$update_module" = "none" > > - then > > + cas

Re: [PATCH v4 3/6] submodule: Explicit local branch creation in module_clone

2014-01-16 Thread Junio C Hamano
"W. Trevor King" writes: > @@ -817,11 +831,15 @@ cmd_update() > > displaypath=$(relative_path "$prefix$sm_path") > > - if test "$update_module" = "none" > - then > + case "$update_module" in > + none) > echo "

Re: [PATCH v4 3/6] submodule: Explicit local branch creation in module_clone

2014-01-16 Thread W. Trevor King
On Thu, Jan 16, 2014 at 11:18:00AM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > @@ -312,7 +317,16 @@ module_clone() > > echo "gitdir: $rel/$a" >"$sm_path/.git" > > > > rel=$(echo $a | sed -e 's|[^/][^/]*|..|g') > > - (clear_local_git_env; cd "$sm_path" && GIT_WORK_TREE=.

Re: [PATCH v4 3/6] submodule: Explicit local branch creation in module_clone

2014-01-16 Thread Junio C Hamano
"W. Trevor King" writes: > The previous code only checked out branches in cmd_add. This commit > moves the branch-checkout logic into module_clone, where it can be > shared by cmd_add and cmd_update. I also update the initial checkout > command to use 'reset' to preserve branches setup during m

[PATCH v4 3/6] submodule: Explicit local branch creation in module_clone

2014-01-15 Thread W. Trevor King
The previous code only checked out branches in cmd_add. This commit moves the branch-checkout logic into module_clone, where it can be shared by cmd_add and cmd_update. I also update the initial checkout command to use 'reset' to preserve branches setup during module_clone. With this change, fol