]> git.ipfire.org Git - thirdparty/git.git/blobdiff - wt-status.c
stat_tracking_info: return +1 when branches not equal
[thirdparty/git.git] / wt-status.c
index ef26f0744632fdcca919e68ffc58bf414b29e597..1137f27aa6c5c49ce8935b39f3b3799fbcaf9b37 100644 (file)
@@ -1796,7 +1796,8 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
 
        color_fprintf(s->fp, branch_color_local, "%s", branch_name);
 
-       if (stat_tracking_info(branch, &num_ours, &num_theirs, &base) < 0) {
+       if (stat_tracking_info(branch, &num_ours, &num_theirs, &base,
+                              AHEAD_BEHIND_FULL) < 0) {
                if (!base)
                        goto conclude;
 
@@ -1933,7 +1934,8 @@ static void wt_porcelain_v2_print_tracking(struct wt_status *s)
                /* Lookup stats on the upstream tracking branch, if set. */
                branch = branch_get(branch_name);
                base = NULL;
-               ab_info = (stat_tracking_info(branch, &nr_ahead, &nr_behind, &base) == 0);
+               ab_info = (stat_tracking_info(branch, &nr_ahead, &nr_behind,
+                                             &base, AHEAD_BEHIND_FULL) >= 0);
                if (base) {
                        base = shorten_unambiguous_ref(base, 0);
                        fprintf(s->fp, "# branch.upstream %s%c", base, eol);