Merge branch 'nd/fbsd-lazy-mtime'
[gitweb.git] / wt-status.c
index c19b52ce8708ebe997f5bc728124a4653014543f..3175ec6ddb6d6e40f8e2cfcbbb0b4acf5f0b5e98 100644 (file)
@@ -432,7 +432,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
                        d->worktree_status = p->status;
                d->dirty_submodule = p->two->dirty_submodule;
                if (S_ISGITLINK(p->two->mode))
-                       d->new_submodule_commits = !!hashcmp(p->one->sha1, p->two->sha1);
+                       d->new_submodule_commits = !!oidcmp(&p->one->oid,
+                                                           &p->two->oid);
        }
 }
 
@@ -947,9 +948,12 @@ static void show_merge_in_progress(struct wt_status *s,
 {
        if (has_unmerged(s)) {
                status_printf_ln(s, color, _("You have unmerged paths."));
-               if (s->hints)
+               if (s->hints) {
                        status_printf_ln(s, color,
-                               _("  (fix conflicts and run \"git commit\")"));
+                                        _("  (fix conflicts and run \"git commit\")"));
+                       status_printf_ln(s, color,
+                                        _("  (use \"git merge --abort\" to abort the merge)"));
+               }
        } else {
                s-> commitable = 1;
                status_printf_ln(s, color,
@@ -1062,7 +1066,7 @@ static void abbrev_sha1_in_line(struct strbuf *line)
                        strbuf_addf(split[1], "%s ", abbrev);
                        strbuf_reset(line);
                        for (i = 0; split[i]; i++)
-                               strbuf_addf(line, "%s", split[i]->buf);
+                               strbuf_addbuf(line, split[i]);
                }
        }
        strbuf_list_free(split);