From: Junio C Hamano Date: Fri, 4 Sep 2015 02:17:57 +0000 (-0700) Subject: Merge branch 'sg/wt-status-header-inclusion' into maint X-Git-Tag: v2.5.2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dc4e7b024436694fe380ef8edd51a307107e959f?hp=-c Merge branch 'sg/wt-status-header-inclusion' into maint * sg/wt-status-header-inclusion: wt-status: move #include "pathspec.h" to the header --- dc4e7b024436694fe380ef8edd51a307107e959f diff --combined wt-status.c index eaed4fed32,4631119e03..e8c39efbcb --- a/wt-status.c +++ b/wt-status.c @@@ -1,5 -1,4 +1,4 @@@ #include "cache.h" - #include "pathspec.h" #include "wt-status.h" #include "object.h" #include "dir.h" @@@ -585,8 -584,6 +584,8 @@@ static void wt_status_collect_untracked DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES; if (s->show_ignored_files) dir.flags |= DIR_SHOW_IGNORED_TOO; + else + dir.untracked = the_index.untracked; setup_standard_excludes(&dir); fill_directory(&dir, &s->pathspec); @@@ -1535,15 -1532,21 +1534,15 @@@ static void wt_shortstatus_print_tracki color_fprintf(s->fp, branch_color_local, "%s", branch_name); - switch (stat_tracking_info(branch, &num_ours, &num_theirs)) { - case 0: - /* no base */ - fputc(s->null_termination ? '\0' : '\n', s->fp); - return; - case -1: - /* with "gone" base */ + if (stat_tracking_info(branch, &num_ours, &num_theirs, &base) < 0) { + if (!base) { + fputc(s->null_termination ? '\0' : '\n', s->fp); + return; + } + upstream_is_gone = 1; - break; - default: - /* with base */ - break; } - base = branch->merge[0]->dst; base = shorten_unambiguous_ref(base, 0); color_fprintf(s->fp, header_color, "..."); color_fprintf(s->fp, branch_color_remote, "%s", base);