Merge branch 'ew/repack-with-bitmaps-by-default'
[gitweb.git] / wt-status.c
index 445a36204a69cf69f2d3e87ea6d308a6b5a9ab29..f4fa98263857015b3d86e05df42e59591e74109a 100644 (file)
@@ -1006,13 +1006,19 @@ size_t wt_status_locate_end(const char *s, size_t len)
        return len;
 }
 
-void wt_status_add_cut_line(FILE *fp)
+void wt_status_append_cut_line(struct strbuf *buf)
 {
        const char *explanation = _("Do not modify or remove the line above.\nEverything below it will be ignored.");
+
+       strbuf_commented_addf(buf, "%s", cut_line);
+       strbuf_add_commented_lines(buf, explanation, strlen(explanation));
+}
+
+void wt_status_add_cut_line(FILE *fp)
+{
        struct strbuf buf = STRBUF_INIT;
 
-       fprintf(fp, "%c %s", comment_line_char, cut_line);
-       strbuf_add_commented_lines(&buf, explanation, strlen(explanation));
+       wt_status_append_cut_line(&buf);
        fputs(buf.buf, fp);
        strbuf_release(&buf);
 }
@@ -1851,7 +1857,7 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
        color_fprintf(s->fp, branch_color_local, "%s", branch_name);
 
        sti = stat_tracking_info(branch, &num_ours, &num_theirs, &base,
-                                s->ahead_behind_flags);
+                                0, s->ahead_behind_flags);
        if (sti < 0) {
                if (!base)
                        goto conclude;
@@ -1990,7 +1996,7 @@ static void wt_porcelain_v2_print_tracking(struct wt_status *s)
                branch = branch_get(branch_name);
                base = NULL;
                ab_info = stat_tracking_info(branch, &nr_ahead, &nr_behind,
-                                            &base, s->ahead_behind_flags);
+                                            &base, 0, s->ahead_behind_flags);
                if (base) {
                        base = shorten_unambiguous_ref(base, 0);
                        fprintf(s->fp, "# branch.upstream %s%c", base, eol);