diff options
author | Jeff King <peff@peff.net> | 2012-05-07 17:09:04 -0400 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-05-08 04:51:08 -0400 |
commit | d4a6bf1fb64d904e210fbf7c5b330b06438a5bd5 (patch) | |
tree | e730861e04c858757025a81f93df92d3f10e8729 /wt-status.c | |
parent | a5985237878481af5fbca349d0d1ad7d6b2d2bcb (diff) | |
download | git-d4a6bf1fb64d904e210fbf7c5b330b06438a5bd5.tar.gz |
status: respect "-b" for porcelain format
There is no reason not to, as the user has to explicitly ask
for it, so we are not breaking compatibility by doing so. We
can do this simply by moving the "show_branch" flag into
the wt_status struct. As a bonus, this saves us from passing
it explicitly, simplifying the code.
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c index b5305ae5f4..bc268ceda0 100644 --- a/wt-status.c +++ b/wt-status.c @@ -918,11 +918,11 @@ static void wt_shortstatus_print_tracking(struct wt_status *s) fputc(s->null_termination ? '\0' : '\n', s->fp); } -void wt_shortstatus_print(struct wt_status *s, int show_branch) +void wt_shortstatus_print(struct wt_status *s) { int i; - if (show_branch) + if (s->show_branch) wt_shortstatus_print_tracking(s); for (i = 0; i < s->change.nr; i++) { @@ -955,5 +955,5 @@ void wt_porcelain_print(struct wt_status *s) s->use_color = 0; s->relative_paths = 0; s->prefix = NULL; - wt_shortstatus_print(s, 0); + wt_shortstatus_print(s); } |