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>

Nguyễn Thái Ngọc Duy committed Nov 28, 2016 at 16:36 UTC 96f09e2a1100d78aacad80a741c3046031fda6b4
1 file changed +3 -3
builtin/worktree.c
+3 -3
@@ -406,10 +406,10 @@ static void show_worktree(struct worktree *wt, int path_maxlen, int abbrev_len)
406 else {
407 strbuf_addf(&sb, "%-*s ", abbrev_len,
408 find_unique_abbrev(wt->head_sha1, DEFAULT_ABBREV));
409 - if (!wt->is_detached)
410 - strbuf_addf(&sb, "[%s]", shorten_unambiguous_ref(wt->head_ref, 0));
411 - else
409 + if (wt->is_detached)
410 strbuf_addstr(&sb, "(detached HEAD)");
411 + else
412 + strbuf_addf(&sb, "[%s]", shorten_unambiguous_ref(wt->head_ref, 0));
413 }
414 printf("%s\n", sb.buf);
415