From: Johannes Schindelin Date: Thu, 26 Jan 2017 16:08:41 +0000 (+0100) Subject: status: be prepared for not-yet-started interactive rebase X-Git-Tag: v2.12.0-rc0~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df9ded4984ca9a2d8da9007049f4fb5275eaa3ac;p=thirdparty%2Fgit.git status: be prepared for not-yet-started interactive rebase Some developers might want to call `git status` in a working directory where they just started an interactive rebase, but the edit script is still opened in the editor. Let's show a meaningful message in such cases. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 5c3db656df..458608cc1e 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 <