summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/git-merge.sh b/git-merge.sh
index 919e6be4b0..49185eb5d2 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -119,11 +119,7 @@ merge_name () {
fi
}
-case "$#" in 0) usage ;; esac
-
-have_message=
-while test $# != 0
-do
+parse_option () {
case "$1" in
-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\
--no-summa|--no-summar|--no-summary)
@@ -166,9 +162,21 @@ do
have_message=t
;;
-*) usage ;;
- *) break ;;
+ *) return 1 ;;
esac
shift
+ args_left=$#
+}
+
+test $# != 0 || usage
+
+have_message=
+while parse_option "$@"
+do
+ while test $args_left -lt $#
+ do
+ shift
+ done
done
if test -z "$show_diffstat"; then