From df9ded4984ca9a2d8da9007049f4fb5275eaa3ac Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 26 Jan 2017 17:08:41 +0100 Subject: [PATCH] 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 --- t/t7512-status-help.sh | 19 +++++++++++++++++++ wt-status.c | 14 ++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) 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 <