diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-27 19:16:21 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-27 19:16:21 (GMT) |
commit | 0da2ba4880f971de2782f2d4cfcd68f9148d2860 (patch) | |
tree | 9b41bf3307485678a5f8e6932dc90bd0349e539b /t | |
parent | 720b1764def1cfd67004d917ec954df20983e6bb (diff) | |
parent | ee5462d6e71aad04628ccb8f078784468bfa4139 (diff) | |
download | git-0da2ba4880f971de2782f2d4cfcd68f9148d2860.zip git-0da2ba4880f971de2782f2d4cfcd68f9148d2860.tar.gz git-0da2ba4880f971de2782f2d4cfcd68f9148d2860.tar.bz2 |
Merge branch 'lb/rebase-i-short-command-names'
With a configuration variable rebase.abbreviateCommands set,
"git rebase -i" produces the todo list with a single-letter
command names.
* lb/rebase-i-short-command-names:
sequencer.c: drop 'const' from function return type
t3404: add test case for abbreviated commands
rebase -i: learn to abbreviate command names
rebase -i -x: add exec commands via the rebase--helper
rebase -i: update functions to use a flags parameter
rebase -i: replace reference to sha1 with oid
rebase -i: refactor transform_todo_ids
rebase -i: set commit to null in exec commands
Documentation: use preferred name for the 'todo list' script
Documentation: move rebase.* configs to new file
Diffstat (limited to 't')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 6a82d1e..481a350 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1260,6 +1260,28 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = error' ' test B = $(git cat-file commit HEAD^ | sed -ne \$p) ' +test_expect_success 'respects rebase.abbreviateCommands with fixup, squash and exec' ' + rebase_setup_and_clean abbrevcmd && + test_commit "first" file1.txt "first line" first && + test_commit "second" file1.txt "another line" second && + test_commit "fixup! first" file2.txt "first line again" first_fixup && + test_commit "squash! second" file1.txt "another line here" second_squash && + cat >expected <<-EOF && + p $(git rev-list --abbrev-commit -1 first) first + f $(git rev-list --abbrev-commit -1 first_fixup) fixup! first + x git show HEAD + p $(git rev-list --abbrev-commit -1 second) second + s $(git rev-list --abbrev-commit -1 second_squash) squash! second + x git show HEAD + EOF + git checkout abbrevcmd && + set_cat_todo_editor && + test_config rebase.abbreviateCommands true && + test_must_fail git rebase -i --exec "git show HEAD" \ + --autosquash master >actual && + test_cmp expected actual +' + test_expect_success 'static check of bad command' ' rebase_setup_and_clean bad-cmd && set_fake_editor && |