Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Wed, 8 Nov 2006 00:34:30 +0000 (16:34 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 8 Nov 2006 00:34:30 +0000 (16:34 -0800)
* maint:
  remove an unneeded test

1  2 
wt-status.c

diff --combined 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;