From: "W. Trevor King" <>

There's no sense in setting up a local branch if we're just going to
go back to a detached HEAD with every checkout-mode update.  This
commit replaces the checkout with a reset, updating whatever the
locally checked out branch (or detached HEAD) happens to be.  While it
is tempting to checkout a new local-branch here (as we did after the
clone), it's more consistent to follow the lead of the other update
modes and just use the currently checked out branch.
--- | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ b/
index 56fc3f1..c5ea7bd 100755
--- a/
+++ b/
@@ -930,9 +930,9 @@ Maybe you want to use 'update --init'?")"
-                               command="git checkout $subforce -q"
-                               die_msg="$(eval_gettext "Unable to checkout 
'\$sha1' in submodule path '\$displaypath'")"
-                               say_msg="$(eval_gettext "Submodule path 
'\$displaypath': checked out '\$sha1'")"
+                               command="git reset --hard -q"
+                               die_msg="$(eval_gettext "Unable to reset branch 
to '\$sha1' in submodule path '\$displaypath'")"
+                               say_msg="$(eval_gettext "Submodule path 
'\$displaypath': reset branch to '\$sha1'")"

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to