# [PATCH 0/1] Fix git status' display of git rebase -ir's label commands

2 messages from 2019-05-10 to 2019-05-10. Participants: Johannes Schindelin via GitGitGadget.
Thread: https://gitlist.dev/t/51071

## Johannes Schindelin via GitGitGadget, 2019-05-10 20:23

Subject: [PATCH 0/1] Fix git status' display of git rebase -ir's label commands
Message-ID: <pull.188.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.188.git.gitgitgadget%40gmail.com

```
Those label commands are currently displayed with their argument resolved as
abbreviated commit hash. Not really what we want. We really want the label
names instead.

Johannes Schindelin (1):
  status: fix display of rebase -ir's `label` command

 wt-status.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


base-commit: 8104ec994ea3849a968b4667d072fedd1e688642
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-188%2Fdscho%2Ffix-status-with-rebase-ir-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-188/dscho/fix-status-with-rebase-ir-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/188
-- 
gitgitgadget

```

## Johannes Schindelin via GitGitGadget, 2019-05-10 20:23

Subject: [PATCH 1/1] status: fix display of rebase -ir's `label` command
Message-ID: <ec9eed5c88b062b7bdfdb5f82b3716f1341ce01c.1557519792.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/ec9eed5c88b062b7bdfdb5f82b3716f1341ce01c.1557519792.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.188.git.gitgitgadget@gmail.com>

```
From: Johannes Schindelin <johannes.schindelin@gmx.de>

The argument of a `label` command does *not* want to be turned into an
abbreviated SHA-1.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 wt-status.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wt-status.c b/wt-status.c
index 1f564b12d2..5fc7de6027 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1197,7 +1197,9 @@ static void abbrev_sha1_in_line(struct strbuf *line)
 	int i;
 
 	if (starts_with(line->buf, "exec ") ||
-	    starts_with(line->buf, "x "))
+	    starts_with(line->buf, "x ") ||
+	    starts_with(line->buf, "label ") ||
+	    starts_with(line->buf, "l "))
 		return;
 
 	split = strbuf_split_max(line, ' ', 3);
-- 
gitgitgadget

```
