summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-07 21:09:04 (GMT)
committerJeff King <peff@peff.net>2012-05-08 08:51:08 (GMT)
commitd4a6bf1fb64d904e210fbf7c5b330b06438a5bd5 (patch)
treee730861e04c858757025a81f93df92d3f10e8729 /wt-status.c
parenta5985237878481af5fbca349d0d1ad7d6b2d2bcb (diff)
downloadgit-d4a6bf1fb64d904e210fbf7c5b330b06438a5bd5.zip
git-d4a6bf1fb64d904e210fbf7c5b330b06438a5bd5.tar.gz
git-d4a6bf1fb64d904e210fbf7c5b330b06438a5bd5.tar.bz2
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c
index b5305ae..bc268ce 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);
}