# 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
command=
branch=
-quiet=
reference=
cached=
nofetch=
update=
-#
-# print stuff on stdout unless -q was specified
-#
-say()
-{
- if test -z "$quiet"
- then
- echo "$@"
- fi
-}
-
# Resolve relative url by appending to parent's url
resolve_relative_url ()
{
shift
;;
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--reference)
case "$2" in '') usage ;; esac
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--)
shift
case "$1" in
-q|--quiet)
shift
- quiet=1
+ GIT_QUIET=1
;;
-i|--init)
init=1
reference="$1"
shift
;;
+ -m|--merge)
+ shift
+ update="merge"
+ ;;
--)
shift
break
action="rebase"
msg="rebased onto"
;;
+ merge)
+ command="git merge"
+ action="merge"
+ msg="merged in"
+ ;;
*)
command="git checkout $force -q"
action="checkout"
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--cached)
cached=1
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
shift
;;
--)
command=$1
;;
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
-b|--branch)
case "$2" in