diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-09-24 00:51:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-23 17:14:03 -0700 |
commit | d66424c4ac661c69640765260235452499d80378 (patch) | |
tree | 26bfe8765b77b05e2d09653d433ffc6789ee3d4e /t | |
parent | git-merge: add support for --commit and --no-squash (diff) | |
download | tgif-d66424c4ac661c69640765260235452499d80378.tar.xz |
git-merge: add --ff and --no-ff options
These new options can be used to control the policy for fast-forward
merges: --ff allows it (this is the default) while --no-ff will create
a merge commit.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7600-merge.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index b0ef488c29..6424c6e2c0 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -417,4 +417,24 @@ test_expect_success 'merge c1 with c2 (override --squash)' ' test_debug 'gitk --all' +test_expect_success 'merge c0 with c1 (no-ff)' ' + git reset --hard c0 && + test_tick && + git merge --no-ff c1 && + verify_merge file result.1 && + verify_parents $c0 $c1 +' + +test_debug 'gitk --all' + +test_expect_success 'merge c0 with c1 (ff overrides no-ff)' ' + git reset --hard c0 && + git config branch.master.mergeoptions "--no-ff" && + git merge --ff c1 && + verify_merge file result.1 && + verify_head $c1 +' + +test_debug 'gitk --all' + test_done |