diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-03-04 00:34:39 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-04 00:34:39 -0800 |
commit | 27b4070e40a771c41ed581ef1ac98dd43e58ab87 (patch) | |
tree | 084c3b9f77e5d9e8253a16e6f9baea5d25f77e46 /git-merge.sh | |
parent | 4947cf9cc377b15006f3e649c59edf9bc813af6f (diff) | |
parent | 52dce39762fbec75b2d561e5dedb25b8e51f83eb (diff) | |
download | git-27b4070e40a771c41ed581ef1ac98dd43e58ab87.tar.gz |
Merge branch 'maint'
* maint:
Fix 'git remote show' regression on empty repository in 1.5.4
Fix incorrect wording in git-merge.txt.
git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
Fix random crashes in http_cleanup()
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-x | git-merge.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/git-merge.sh b/git-merge.sh index 1c123a37e6..03cd39873a 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" \ @@ -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 |