Skip to contentSkip to conversation

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

PATCH New Johannes Schindelin via GitGitGadget 1 participant 2 messages May 10, 2019

lore
Share & tools
lore
#0 lore raw

cover Fix git status' display of git rebase -ir's label commands

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

Signature · 1 line
gitgitgadget
#1 lore raw

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

From: Johannes Schindelin <[email protected]>

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

---
 wt-status.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wt-status.c +3 -1
index 1f564b12d2..5fc7de6027 100644
@@ -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);
Signature · 1 line
gitgitgadget