X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-merge.sh;h=7dbbb1d79dc1d66db3a662045a13554f8d574004;hb=3ea5a1b33d99b6c4f5e745c0dd017307c58cff31;hp=1c123a37e6941b6727c6101bb29cbc485a380c20;hpb=f124e986cf19e8f36895ae474d50f8d389e73d02;p=git.git diff --git a/git-merge.sh b/git-merge.sh index 1c123a37e..7dbbb1d79 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -37,6 +37,7 @@ use_strategies= allow_fast_forward=t allow_trivial_merge=t +squash= no_commit= dropsave() { rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \ @@ -70,7 +71,7 @@ finish_up_to_date () { squash_message () { echo Squashed commit of the following: echo - git log --no-merges ^"$head" $remoteheads + git log --no-merges --pretty=medium ^"$head" $remoteheads } finish () { @@ -152,17 +153,21 @@ parse_config () { --summary) show_diffstat=t ;; --squash) - allow_fast_forward=t squash=t no_commit=t ;; + test "$allow_fast_forward" = t || + die "You cannot combine --squash with --no-ff." + squash=t no_commit=t ;; --no-squash) - allow_fast_forward=t squash= no_commit= ;; + squash= no_commit= ;; --commit) - allow_fast_forward=t squash= no_commit= ;; + no_commit= ;; --no-commit) - allow_fast_forward=t squash= no_commit=t ;; + no_commit=t ;; --ff) - allow_fast_forward=t squash= no_commit= ;; + allow_fast_forward=t ;; --no-ff) - allow_fast_forward=false squash= no_commit= ;; + test "$squash" != t || + die "You cannot combine --squash with --no-ff." + allow_fast_forward=f ;; -s|--strategy) shift case " $all_strategies " in