git-submodule: add support for --merge.
[gitweb.git] / git-submodule.sh
index f384c6b2b4953110ab0f892aabdbb826ac2263da..3aff37970ad22c2498e1b2755a214e2fdb183f21 100755 (executable)
@@ -5,7 +5,7 @@
 # Copyright (c) 2007 Lars Hjemli
 
 USAGE="[--quiet] [--cached] \
-[add [-b branch] <repo> <path>]|[status|init|update [-i|--init] [-N|--no-fetch]|summary [-n|--summary-limit <n>] [<commit>]] \
+[add [-b branch] <repo> <path>]|[status|init|update [-i|--init] [-N|--no-fetch] [--rebase|--merge]|summary [-n|--summary-limit <n>] [<commit>]] \
 [--] [<path>...]|[foreach <command>]|[sync [--] [<path>...]]"
 OPTIONS_SPEC=
 . git-sh-setup
@@ -331,6 +331,10 @@ cmd_update()
                        shift
                        update="rebase"
                        ;;
+               -m|--merge)
+                       shift
+                       update="merge"
+                       ;;
                --)
                        shift
                        break
@@ -396,6 +400,11 @@ cmd_update()
                                action="rebase"
                                msg="rebased onto"
                                ;;
+                       merge)
+                               command="git merge"
+                               action="merge"
+                               msg="merged in"
+                               ;;
                        *)
                                command="git checkout $force -q"
                                action="checkout"