threads / patch / 51071

patchFix git status' display of git rebase -ir's label commands

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

## tl;dr

2 messages between May 10, 2019 and May 10, 2019. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Johannes Schindelin via GitGitGadget· May 10, 2019, 20:23 UTC · lore

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· May 10, 2019, 20:23 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH 1/1] status: fix display of rebase -ir's `label` command

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(-)
Show changes to wt-status.c +3 −1
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

← back to recent threads