From: Junio C Hamano Date: Wed, 8 Nov 2006 00:34:30 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.4.4-rc1~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c56f243e20ce48ae50caf841ada8435a21c2a8bf?ds=inline;hp=-c Merge branch 'maint' * maint: remove an unneeded test --- c56f243e20ce48ae50caf841ada8435a21c2a8bf diff --combined wt-status.c index 9692dfa325,674284415e..794394480c --- a/wt-status.c +++ b/wt-status.c @@@ -41,8 -41,10 +41,8 @@@ void wt_status_prepare(struct wt_statu s->is_initial = get_sha1("HEAD", sha1) ? 1 : 0; - head = resolve_ref(git_path("HEAD"), sha1, 0); - s->branch = head ? - strdup(head + strlen(get_git_dir()) + 1) : - NULL; + head = resolve_ref("HEAD", sha1, 0, NULL); + s->branch = head ? xstrdup(head) : NULL; s->reference = "HEAD"; s->amend = 0; @@@ -70,25 -72,25 +70,25 @@@ static void wt_status_print_filepair(in color_printf(color(WT_STATUS_HEADER), "#\t"); switch (p->status) { case DIFF_STATUS_ADDED: - color_printf(c, "new file: %s", p->one->path); break; + color_printf(c, "new file: %s", p->one->path); break; case DIFF_STATUS_COPIED: - color_printf(c, "copied: %s -> %s", + color_printf(c, "copied: %s -> %s", p->one->path, p->two->path); break; case DIFF_STATUS_DELETED: - color_printf(c, "deleted: %s", p->one->path); break; + color_printf(c, "deleted: %s", p->one->path); break; case DIFF_STATUS_MODIFIED: - color_printf(c, "modified: %s", p->one->path); break; + color_printf(c, "modified: %s", p->one->path); break; case DIFF_STATUS_RENAMED: - color_printf(c, "renamed: %s -> %s", + color_printf(c, "renamed: %s -> %s", p->one->path, p->two->path); break; case DIFF_STATUS_TYPE_CHANGED: color_printf(c, "typechange: %s", p->one->path); break; case DIFF_STATUS_UNKNOWN: - color_printf(c, "unknown: %s", p->one->path); break; + color_printf(c, "unknown: %s", p->one->path); break; case DIFF_STATUS_UNMERGED: - color_printf(c, "unmerged: %s", p->one->path); break; + color_printf(c, "unmerged: %s", p->one->path); break; default: die("bug: unhandled diff status %c", p->status); } @@@ -102,8 -104,6 +102,6 @@@ static void wt_status_print_updated_cb( struct wt_status *s = data; int shown_header = 0; int i; - if (q->nr) { - } for (i = 0; i < q->nr; i++) { if (q->queue[i]->status == 'U') continue;