diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-02-02 13:36:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-02 13:36:54 -0800 |
commit | 93d2387718b20b9b0784dce4a361c0b74ab632b7 (patch) | |
tree | e860ba41b67819b846eb7bcc8a945505fa5279e8 /t | |
parent | 9dec2c652fdfebf8861b526405422088e7022bc0 (diff) | |
parent | df9ded4984ca9a2d8da9007049f4fb5275eaa3ac (diff) | |
download | git-93d2387718b20b9b0784dce4a361c0b74ab632b7.tar.gz git-93d2387718b20b9b0784dce4a361c0b74ab632b7.tar.xz |
Merge branch 'js/status-pre-rebase-i'
After starting "git rebase -i", which first opens the user's editor
to edit the series of patches to apply, but before saving the
contents of that file, "git status" failed to show the current
state (i.e. you are in an interactive rebase session, but you have
applied no steps yet) correctly.
* js/status-pre-rebase-i:
status: be prepared for not-yet-started interactive rebase
Diffstat (limited to 't')
-rwxr-xr-x | t/t7512-status-help.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 5c3db656d..458608cc1 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -944,4 +944,23 @@ EOF test_i18ncmp expected actual ' +test_expect_success 'status: handle not-yet-started rebase -i gracefully' ' + ONTO=$(git rev-parse --short HEAD^) && + COMMIT=$(git rev-parse --short HEAD) && + EDITOR="git status --untracked-files=no >actual" git rebase -i HEAD^ && + cat >expected <<EOF && +On branch several_commits +No commands done. +Next command to do (1 remaining command): + pick $COMMIT four_commit + (use "git rebase --edit-todo" to view and edit) +You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''. + (use "git commit --amend" to amend the current commit) + (use "git rebase --continue" once you are satisfied with your changes) + +nothing to commit (use -u to show untracked files) +EOF + test_i18ncmp expected actual +' + test_done |