Merge branch 'sg/wt-status-header-inclusion' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 4 Sep 2015 02:17:57 +0000 (19:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Sep 2015 02:17:57 +0000 (19:17 -0700)
* sg/wt-status-header-inclusion:
wt-status: move #include "pathspec.h" to the header

1  2 
wt-status.c
diff --combined wt-status.c
index eaed4fed32f48f4834afaf47f87bda7ce4794308,4631119e03a638adfdb650fa782e3d327f018c90..e8c39efbcb24203577458662e0ddfe9928a332b7
@@@ -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);