10 #include "run-command.h"
13 static char default_wt_status_colors
[][COLOR_MAXLEN
] = {
14 GIT_COLOR_NORMAL
, /* WT_STATUS_HEADER */
15 GIT_COLOR_GREEN
, /* WT_STATUS_UPDATED */
16 GIT_COLOR_RED
, /* WT_STATUS_CHANGED */
17 GIT_COLOR_RED
, /* WT_STATUS_UNTRACKED */
18 GIT_COLOR_RED
, /* WT_STATUS_NOBRANCH */
19 GIT_COLOR_RED
, /* WT_STATUS_UNMERGED */
22 static const char *color(int slot
, struct wt_status
*s
)
24 return s
->use_color
> 0 ? s
->color_palette
[slot
] : "";
27 void wt_status_prepare(struct wt_status
*s
)
29 unsigned char sha1
[20];
32 memset(s
, 0, sizeof(*s
));
33 memcpy(s
->color_palette
, default_wt_status_colors
,
34 sizeof(default_wt_status_colors
));
35 s
->show_untracked_files
= SHOW_NORMAL_UNTRACKED_FILES
;
37 s
->relative_paths
= 1;
38 head
= resolve_ref("HEAD", sha1
, 0, NULL
);
39 s
->branch
= head
? xstrdup(head
) : NULL
;
40 s
->reference
= "HEAD";
42 s
->index_file
= get_index_file();
43 s
->change
.strdup_strings
= 1;
44 s
->untracked
.strdup_strings
= 1;
47 static void wt_status_print_unmerged_header(struct wt_status
*s
)
49 const char *c
= color(WT_STATUS_HEADER
, s
);
51 color_fprintf_ln(s
->fp
, c
, "# Unmerged paths:");
52 if (!advice_status_hints
)
56 else if (!s
->is_initial
)
57 color_fprintf_ln(s
->fp
, c
, "# (use \"git reset %s <file>...\" to unstage)", s
->reference
);
59 color_fprintf_ln(s
->fp
, c
, "# (use \"git rm --cached <file>...\" to unstage)");
60 color_fprintf_ln(s
->fp
, c
, "# (use \"git add/rm <file>...\" as appropriate to mark resolution)");
61 color_fprintf_ln(s
->fp
, c
, "#");
64 static void wt_status_print_cached_header(struct wt_status
*s
)
66 const char *c
= color(WT_STATUS_HEADER
, s
);
68 color_fprintf_ln(s
->fp
, c
, "# Changes to be committed:");
69 if (!advice_status_hints
)
72 ; /* NEEDSWORK: use "git reset --unresolve"??? */
73 else if (!s
->is_initial
)
74 color_fprintf_ln(s
->fp
, c
, "# (use \"git reset %s <file>...\" to unstage)", s
->reference
);
76 color_fprintf_ln(s
->fp
, c
, "# (use \"git rm --cached <file>...\" to unstage)");
77 color_fprintf_ln(s
->fp
, c
, "#");
80 static void wt_status_print_dirty_header(struct wt_status
*s
,
82 int has_dirty_submodules
)
84 const char *c
= color(WT_STATUS_HEADER
, s
);
86 color_fprintf_ln(s
->fp
, c
, "# Changed but not updated:");
87 if (!advice_status_hints
)
90 color_fprintf_ln(s
->fp
, c
, "# (use \"git add <file>...\" to update what will be committed)");
92 color_fprintf_ln(s
->fp
, c
, "# (use \"git add/rm <file>...\" to update what will be committed)");
93 color_fprintf_ln(s
->fp
, c
, "# (use \"git checkout -- <file>...\" to discard changes in working directory)");
94 if (has_dirty_submodules
)
95 color_fprintf_ln(s
->fp
, c
, "# (commit or discard the untracked or modified content in submodules)");
96 color_fprintf_ln(s
->fp
, c
, "#");
99 static void wt_status_print_untracked_header(struct wt_status
*s
)
101 const char *c
= color(WT_STATUS_HEADER
, s
);
102 color_fprintf_ln(s
->fp
, c
, "# Untracked files:");
103 if (!advice_status_hints
)
105 color_fprintf_ln(s
->fp
, c
, "# (use \"git add <file>...\" to include in what will be committed)");
106 color_fprintf_ln(s
->fp
, c
, "#");
109 static void wt_status_print_trailer(struct wt_status
*s
)
111 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
), "#");
114 #define quote_path quote_path_relative
116 static void wt_status_print_unmerged_data(struct wt_status
*s
,
117 struct string_list_item
*it
)
119 const char *c
= color(WT_STATUS_UNMERGED
, s
);
120 struct wt_status_change_data
*d
= it
->util
;
121 struct strbuf onebuf
= STRBUF_INIT
;
122 const char *one
, *how
= "bug";
124 one
= quote_path(it
->string
, -1, &onebuf
, s
->prefix
);
125 color_fprintf(s
->fp
, color(WT_STATUS_HEADER
, s
), "#\t");
126 switch (d
->stagemask
) {
127 case 1: how
= "both deleted:"; break;
128 case 2: how
= "added by us:"; break;
129 case 3: how
= "deleted by them:"; break;
130 case 4: how
= "added by them:"; break;
131 case 5: how
= "deleted by us:"; break;
132 case 6: how
= "both added:"; break;
133 case 7: how
= "both modified:"; break;
135 color_fprintf(s
->fp
, c
, "%-20s%s\n", how
, one
);
136 strbuf_release(&onebuf
);
139 static void wt_status_print_change_data(struct wt_status
*s
,
141 struct string_list_item
*it
)
143 struct wt_status_change_data
*d
= it
->util
;
144 const char *c
= color(change_type
, s
);
148 const char *one
, *two
;
149 struct strbuf onebuf
= STRBUF_INIT
, twobuf
= STRBUF_INIT
;
150 struct strbuf extra
= STRBUF_INIT
;
152 one_name
= two_name
= it
->string
;
153 switch (change_type
) {
154 case WT_STATUS_UPDATED
:
155 status
= d
->index_status
;
157 one_name
= d
->head_path
;
159 case WT_STATUS_CHANGED
:
160 if (d
->new_submodule_commits
|| d
->dirty_submodule
) {
161 strbuf_addstr(&extra
, " (");
162 if (d
->new_submodule_commits
)
163 strbuf_addf(&extra
, "new commits, ");
164 if (d
->dirty_submodule
& DIRTY_SUBMODULE_MODIFIED
)
165 strbuf_addf(&extra
, "modified content, ");
166 if (d
->dirty_submodule
& DIRTY_SUBMODULE_UNTRACKED
)
167 strbuf_addf(&extra
, "untracked content, ");
168 strbuf_setlen(&extra
, extra
.len
- 2);
169 strbuf_addch(&extra
, ')');
171 status
= d
->worktree_status
;
175 one
= quote_path(one_name
, -1, &onebuf
, s
->prefix
);
176 two
= quote_path(two_name
, -1, &twobuf
, s
->prefix
);
178 color_fprintf(s
->fp
, color(WT_STATUS_HEADER
, s
), "#\t");
180 case DIFF_STATUS_ADDED
:
181 color_fprintf(s
->fp
, c
, "new file: %s", one
);
183 case DIFF_STATUS_COPIED
:
184 color_fprintf(s
->fp
, c
, "copied: %s -> %s", one
, two
);
186 case DIFF_STATUS_DELETED
:
187 color_fprintf(s
->fp
, c
, "deleted: %s", one
);
189 case DIFF_STATUS_MODIFIED
:
190 color_fprintf(s
->fp
, c
, "modified: %s", one
);
192 case DIFF_STATUS_RENAMED
:
193 color_fprintf(s
->fp
, c
, "renamed: %s -> %s", one
, two
);
195 case DIFF_STATUS_TYPE_CHANGED
:
196 color_fprintf(s
->fp
, c
, "typechange: %s", one
);
198 case DIFF_STATUS_UNKNOWN
:
199 color_fprintf(s
->fp
, c
, "unknown: %s", one
);
201 case DIFF_STATUS_UNMERGED
:
202 color_fprintf(s
->fp
, c
, "unmerged: %s", one
);
205 die("bug: unhandled diff status %c", status
);
208 color_fprintf(s
->fp
, color(WT_STATUS_HEADER
, s
), "%s", extra
.buf
);
209 strbuf_release(&extra
);
211 fprintf(s
->fp
, "\n");
212 strbuf_release(&onebuf
);
213 strbuf_release(&twobuf
);
216 static void wt_status_collect_changed_cb(struct diff_queue_struct
*q
,
217 struct diff_options
*options
,
220 struct wt_status
*s
= data
;
225 s
->workdir_dirty
= 1;
226 for (i
= 0; i
< q
->nr
; i
++) {
227 struct diff_filepair
*p
;
228 struct string_list_item
*it
;
229 struct wt_status_change_data
*d
;
232 it
= string_list_insert(p
->one
->path
, &s
->change
);
235 d
= xcalloc(1, sizeof(*d
));
238 if (!d
->worktree_status
)
239 d
->worktree_status
= p
->status
;
240 d
->dirty_submodule
= p
->two
->dirty_submodule
;
241 if (S_ISGITLINK(p
->two
->mode
))
242 d
->new_submodule_commits
= !!hashcmp(p
->one
->sha1
, p
->two
->sha1
);
246 static int unmerged_mask(const char *path
)
249 struct cache_entry
*ce
;
251 pos
= cache_name_pos(path
, strlen(path
));
257 while (pos
< active_nr
) {
258 ce
= active_cache
[pos
++];
259 if (strcmp(ce
->name
, path
) || !ce_stage(ce
))
261 mask
|= (1 << (ce_stage(ce
) - 1));
266 static void wt_status_collect_updated_cb(struct diff_queue_struct
*q
,
267 struct diff_options
*options
,
270 struct wt_status
*s
= data
;
273 for (i
= 0; i
< q
->nr
; i
++) {
274 struct diff_filepair
*p
;
275 struct string_list_item
*it
;
276 struct wt_status_change_data
*d
;
279 it
= string_list_insert(p
->two
->path
, &s
->change
);
282 d
= xcalloc(1, sizeof(*d
));
285 if (!d
->index_status
)
286 d
->index_status
= p
->status
;
288 case DIFF_STATUS_COPIED
:
289 case DIFF_STATUS_RENAMED
:
290 d
->head_path
= xstrdup(p
->one
->path
);
292 case DIFF_STATUS_UNMERGED
:
293 d
->stagemask
= unmerged_mask(p
->two
->path
);
299 static void wt_status_collect_changes_worktree(struct wt_status
*s
)
303 init_revisions(&rev
, NULL
);
304 setup_revisions(0, NULL
, &rev
, NULL
);
305 rev
.diffopt
.output_format
|= DIFF_FORMAT_CALLBACK
;
306 DIFF_OPT_SET(&rev
.diffopt
, DIRTY_SUBMODULES
);
307 if (!s
->show_untracked_files
)
308 DIFF_OPT_SET(&rev
.diffopt
, IGNORE_UNTRACKED_IN_SUBMODULES
);
309 rev
.diffopt
.format_callback
= wt_status_collect_changed_cb
;
310 rev
.diffopt
.format_callback_data
= s
;
311 rev
.prune_data
= s
->pathspec
;
312 run_diff_files(&rev
, 0);
315 static void wt_status_collect_changes_index(struct wt_status
*s
)
319 init_revisions(&rev
, NULL
);
320 setup_revisions(0, NULL
, &rev
,
321 s
->is_initial
? EMPTY_TREE_SHA1_HEX
: s
->reference
);
322 rev
.diffopt
.output_format
|= DIFF_FORMAT_CALLBACK
;
323 rev
.diffopt
.format_callback
= wt_status_collect_updated_cb
;
324 rev
.diffopt
.format_callback_data
= s
;
325 rev
.diffopt
.detect_rename
= 1;
326 rev
.diffopt
.rename_limit
= 200;
327 rev
.diffopt
.break_opt
= 0;
328 rev
.prune_data
= s
->pathspec
;
329 run_diff_index(&rev
, 1);
332 static void wt_status_collect_changes_initial(struct wt_status
*s
)
336 for (i
= 0; i
< active_nr
; i
++) {
337 struct string_list_item
*it
;
338 struct wt_status_change_data
*d
;
339 struct cache_entry
*ce
= active_cache
[i
];
341 if (!ce_path_match(ce
, s
->pathspec
))
343 it
= string_list_insert(ce
->name
, &s
->change
);
346 d
= xcalloc(1, sizeof(*d
));
350 d
->index_status
= DIFF_STATUS_UNMERGED
;
351 d
->stagemask
|= (1 << (ce_stage(ce
) - 1));
354 d
->index_status
= DIFF_STATUS_ADDED
;
358 static void wt_status_collect_untracked(struct wt_status
*s
)
361 struct dir_struct dir
;
363 if (!s
->show_untracked_files
)
365 memset(&dir
, 0, sizeof(dir
));
366 if (s
->show_untracked_files
!= SHOW_ALL_UNTRACKED_FILES
)
368 DIR_SHOW_OTHER_DIRECTORIES
| DIR_HIDE_EMPTY_DIRECTORIES
;
369 setup_standard_excludes(&dir
);
371 fill_directory(&dir
, s
->pathspec
);
372 for (i
= 0; i
< dir
.nr
; i
++) {
373 struct dir_entry
*ent
= dir
.entries
[i
];
374 if (!cache_name_is_other(ent
->name
, ent
->len
))
376 if (!match_pathspec(s
->pathspec
, ent
->name
, ent
->len
, 0, NULL
))
378 s
->workdir_untracked
= 1;
379 string_list_insert(ent
->name
, &s
->untracked
);
383 void wt_status_collect(struct wt_status
*s
)
385 wt_status_collect_changes_worktree(s
);
388 wt_status_collect_changes_initial(s
);
390 wt_status_collect_changes_index(s
);
391 wt_status_collect_untracked(s
);
394 static void wt_status_print_unmerged(struct wt_status
*s
)
396 int shown_header
= 0;
399 for (i
= 0; i
< s
->change
.nr
; i
++) {
400 struct wt_status_change_data
*d
;
401 struct string_list_item
*it
;
402 it
= &(s
->change
.items
[i
]);
407 wt_status_print_unmerged_header(s
);
410 wt_status_print_unmerged_data(s
, it
);
413 wt_status_print_trailer(s
);
417 static void wt_status_print_updated(struct wt_status
*s
)
419 int shown_header
= 0;
422 for (i
= 0; i
< s
->change
.nr
; i
++) {
423 struct wt_status_change_data
*d
;
424 struct string_list_item
*it
;
425 it
= &(s
->change
.items
[i
]);
427 if (!d
->index_status
||
428 d
->index_status
== DIFF_STATUS_UNMERGED
)
431 wt_status_print_cached_header(s
);
435 wt_status_print_change_data(s
, WT_STATUS_UPDATED
, it
);
438 wt_status_print_trailer(s
);
444 * 1 : some change but no delete
446 static int wt_status_check_worktree_changes(struct wt_status
*s
,
447 int *dirty_submodules
)
452 *dirty_submodules
= 0;
454 for (i
= 0; i
< s
->change
.nr
; i
++) {
455 struct wt_status_change_data
*d
;
456 d
= s
->change
.items
[i
].util
;
457 if (!d
->worktree_status
||
458 d
->worktree_status
== DIFF_STATUS_UNMERGED
)
462 if (d
->dirty_submodule
)
463 *dirty_submodules
= 1;
464 if (d
->worktree_status
== DIFF_STATUS_DELETED
)
470 static void wt_status_print_changed(struct wt_status
*s
)
472 int i
, dirty_submodules
;
473 int worktree_changes
= wt_status_check_worktree_changes(s
, &dirty_submodules
);
475 if (!worktree_changes
)
478 wt_status_print_dirty_header(s
, worktree_changes
< 0, dirty_submodules
);
480 for (i
= 0; i
< s
->change
.nr
; i
++) {
481 struct wt_status_change_data
*d
;
482 struct string_list_item
*it
;
483 it
= &(s
->change
.items
[i
]);
485 if (!d
->worktree_status
||
486 d
->worktree_status
== DIFF_STATUS_UNMERGED
)
488 wt_status_print_change_data(s
, WT_STATUS_CHANGED
, it
);
490 wt_status_print_trailer(s
);
493 static void wt_status_print_submodule_summary(struct wt_status
*s
, int uncommitted
)
495 struct child_process sm_summary
;
496 char summary_limit
[64];
497 char index
[PATH_MAX
];
498 const char *env
[] = { index
, NULL
};
499 const char *argv
[] = {
502 uncommitted
? "--files" : "--cached",
506 uncommitted
? NULL
: (s
->amend
? "HEAD^" : "HEAD"),
510 sprintf(summary_limit
, "%d", s
->submodule_summary
);
511 snprintf(index
, sizeof(index
), "GIT_INDEX_FILE=%s", s
->index_file
);
513 memset(&sm_summary
, 0, sizeof(sm_summary
));
514 sm_summary
.argv
= argv
;
515 sm_summary
.env
= env
;
516 sm_summary
.git_cmd
= 1;
517 sm_summary
.no_stdin
= 1;
519 sm_summary
.out
= dup(fileno(s
->fp
)); /* run_command closes it */
520 run_command(&sm_summary
);
523 static void wt_status_print_untracked(struct wt_status
*s
)
526 struct strbuf buf
= STRBUF_INIT
;
528 if (!s
->untracked
.nr
)
531 wt_status_print_untracked_header(s
);
532 for (i
= 0; i
< s
->untracked
.nr
; i
++) {
533 struct string_list_item
*it
;
534 it
= &(s
->untracked
.items
[i
]);
535 color_fprintf(s
->fp
, color(WT_STATUS_HEADER
, s
), "#\t");
536 color_fprintf_ln(s
->fp
, color(WT_STATUS_UNTRACKED
, s
), "%s",
537 quote_path(it
->string
, strlen(it
->string
),
540 strbuf_release(&buf
);
543 static void wt_status_print_verbose(struct wt_status
*s
)
547 init_revisions(&rev
, NULL
);
548 DIFF_OPT_SET(&rev
.diffopt
, ALLOW_TEXTCONV
);
549 setup_revisions(0, NULL
, &rev
,
550 s
->is_initial
? EMPTY_TREE_SHA1_HEX
: s
->reference
);
551 rev
.diffopt
.output_format
|= DIFF_FORMAT_PATCH
;
552 rev
.diffopt
.detect_rename
= 1;
553 rev
.diffopt
.file
= s
->fp
;
554 rev
.diffopt
.close_file
= 0;
556 * If we're not going to stdout, then we definitely don't
557 * want color, since we are going to the commit message
558 * file (and even the "auto" setting won't work, since it
559 * will have checked isatty on stdout).
562 DIFF_OPT_CLR(&rev
.diffopt
, COLOR_DIFF
);
563 run_diff_index(&rev
, 1);
566 static void wt_status_print_tracking(struct wt_status
*s
)
568 struct strbuf sb
= STRBUF_INIT
;
570 struct branch
*branch
;
572 assert(s
->branch
&& !s
->is_initial
);
573 if (prefixcmp(s
->branch
, "refs/heads/"))
575 branch
= branch_get(s
->branch
+ 11);
576 if (!format_tracking_info(branch
, &sb
))
579 for (cp
= sb
.buf
; (ep
= strchr(cp
, '\n')) != NULL
; cp
= ep
+ 1)
580 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
),
581 "# %.*s", (int)(ep
- cp
), cp
);
582 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
), "#");
585 void wt_status_print(struct wt_status
*s
)
587 const char *branch_color
= color(WT_STATUS_HEADER
, s
);
590 const char *on_what
= "On branch ";
591 const char *branch_name
= s
->branch
;
592 if (!prefixcmp(branch_name
, "refs/heads/"))
594 else if (!strcmp(branch_name
, "HEAD")) {
596 branch_color
= color(WT_STATUS_NOBRANCH
, s
);
597 on_what
= "Not currently on any branch.";
599 color_fprintf(s
->fp
, color(WT_STATUS_HEADER
, s
), "# ");
600 color_fprintf_ln(s
->fp
, branch_color
, "%s%s", on_what
, branch_name
);
602 wt_status_print_tracking(s
);
606 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
), "#");
607 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
), "# Initial commit");
608 color_fprintf_ln(s
->fp
, color(WT_STATUS_HEADER
, s
), "#");
611 wt_status_print_updated(s
);
612 wt_status_print_unmerged(s
);
613 wt_status_print_changed(s
);
614 if (s
->submodule_summary
) {
615 wt_status_print_submodule_summary(s
, 0); /* staged */
616 wt_status_print_submodule_summary(s
, 1); /* unstaged */
618 if (s
->show_untracked_files
)
619 wt_status_print_untracked(s
);
620 else if (s
->commitable
)
621 fprintf(s
->fp
, "# Untracked files not listed (use -u option to show untracked files)\n");
624 wt_status_print_verbose(s
);
625 if (!s
->commitable
) {
627 fprintf(s
->fp
, "# No changes\n");
630 else if (s
->workdir_dirty
)
631 printf("no changes added to commit (use \"git add\" and/or \"git commit -a\")\n");
632 else if (s
->untracked
.nr
)
633 printf("nothing added to commit but untracked files present (use \"git add\" to track)\n");
634 else if (s
->is_initial
)
635 printf("nothing to commit (create/copy files and use \"git add\" to track)\n");
636 else if (!s
->show_untracked_files
)
637 printf("nothing to commit (use -u to show untracked files)\n");
639 printf("nothing to commit (working directory clean)\n");
643 static void wt_shortstatus_unmerged(int null_termination
, struct string_list_item
*it
,
646 struct wt_status_change_data
*d
= it
->util
;
647 const char *how
= "??";
649 switch (d
->stagemask
) {
650 case 1: how
= "DD"; break; /* both deleted */
651 case 2: how
= "AU"; break; /* added by us */
652 case 3: how
= "UD"; break; /* deleted by them */
653 case 4: how
= "UA"; break; /* added by them */
654 case 5: how
= "DU"; break; /* deleted by us */
655 case 6: how
= "AA"; break; /* both added */
656 case 7: how
= "UU"; break; /* both modified */
658 color_fprintf(s
->fp
, color(WT_STATUS_UNMERGED
, s
), "%s", how
);
659 if (null_termination
) {
660 fprintf(stdout
, " %s%c", it
->string
, 0);
662 struct strbuf onebuf
= STRBUF_INIT
;
664 one
= quote_path(it
->string
, -1, &onebuf
, s
->prefix
);
665 printf(" %s\n", one
);
666 strbuf_release(&onebuf
);
670 static void wt_shortstatus_status(int null_termination
, struct string_list_item
*it
,
673 struct wt_status_change_data
*d
= it
->util
;
676 color_fprintf(s
->fp
, color(WT_STATUS_UPDATED
, s
), "%c", d
->index_status
);
679 if (d
->worktree_status
)
680 color_fprintf(s
->fp
, color(WT_STATUS_CHANGED
, s
), "%c", d
->worktree_status
);
684 if (null_termination
) {
685 fprintf(stdout
, "%s%c", it
->string
, 0);
687 fprintf(stdout
, "%s%c", d
->head_path
, 0);
689 struct strbuf onebuf
= STRBUF_INIT
;
692 one
= quote_path(d
->head_path
, -1, &onebuf
, s
->prefix
);
693 printf("%s -> ", one
);
694 strbuf_release(&onebuf
);
696 one
= quote_path(it
->string
, -1, &onebuf
, s
->prefix
);
698 strbuf_release(&onebuf
);
702 static void wt_shortstatus_untracked(int null_termination
, struct string_list_item
*it
,
705 if (null_termination
) {
706 fprintf(stdout
, "?? %s%c", it
->string
, 0);
708 struct strbuf onebuf
= STRBUF_INIT
;
710 one
= quote_path(it
->string
, -1, &onebuf
, s
->prefix
);
711 color_fprintf(s
->fp
, color(WT_STATUS_UNTRACKED
, s
), "??");
712 printf(" %s\n", one
);
713 strbuf_release(&onebuf
);
717 void wt_shortstatus_print(struct wt_status
*s
, int null_termination
)
720 for (i
= 0; i
< s
->change
.nr
; i
++) {
721 struct wt_status_change_data
*d
;
722 struct string_list_item
*it
;
724 it
= &(s
->change
.items
[i
]);
727 wt_shortstatus_unmerged(null_termination
, it
, s
);
729 wt_shortstatus_status(null_termination
, it
, s
);
731 for (i
= 0; i
< s
->untracked
.nr
; i
++) {
732 struct string_list_item
*it
;
734 it
= &(s
->untracked
.items
[i
]);
735 wt_shortstatus_untracked(null_termination
, it
, s
);
739 void wt_porcelain_print(struct wt_status
*s
, int null_termination
)
742 s
->relative_paths
= 0;
744 wt_shortstatus_print(s
, null_termination
);