worktree: reorder an if statement
This is no-op. But it helps reduce diff noise in the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
f054996d83
commit
96f09e2a11
|
@ -406,10 +406,10 @@ static void show_worktree(struct worktree *wt, int path_maxlen, int abbrev_len)
|
||||||
else {
|
else {
|
||||||
strbuf_addf(&sb, "%-*s ", abbrev_len,
|
strbuf_addf(&sb, "%-*s ", abbrev_len,
|
||||||
find_unique_abbrev(wt->head_sha1, DEFAULT_ABBREV));
|
find_unique_abbrev(wt->head_sha1, DEFAULT_ABBREV));
|
||||||
if (!wt->is_detached)
|
if (wt->is_detached)
|
||||||
strbuf_addf(&sb, "[%s]", shorten_unambiguous_ref(wt->head_ref, 0));
|
|
||||||
else
|
|
||||||
strbuf_addstr(&sb, "(detached HEAD)");
|
strbuf_addstr(&sb, "(detached HEAD)");
|
||||||
|
else
|
||||||
|
strbuf_addf(&sb, "[%s]", shorten_unambiguous_ref(wt->head_ref, 0));
|
||||||
}
|
}
|
||||||
printf("%s\n", sb.buf);
|
printf("%s\n", sb.buf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue