summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fe2a89)
raw | patch | inline | side by side (parent: 3fe2a89)
author | Jeff King <peff@peff.net> | |
Mon, 7 Dec 2009 05:17:15 +0000 (00:17 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Dec 2009 08:40:22 +0000 (00:40 -0800) |
The porcelain format is identical to the shortstatus format,
except that it should not respect any user configuration,
including color.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
except that it should not respect any user configuration,
including color.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | patch | blob | history | |
wt-status.c | patch | blob | history | |
wt-status.h | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index 07cc76c04a4b7040a4fc9fe94744f13a1848c5ff..ded58984ac983fe09b817c2c2b0af386266f6fe3 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
wt_shortstatus_print(s, null_termination);
break;
case STATUS_FORMAT_PORCELAIN:
- wt_shortstatus_print(s, null_termination);
+ wt_porcelain_print(s, null_termination);
break;
case STATUS_FORMAT_LONG:
wt_status_print(s);
wt_shortstatus_print(&s, null_termination);
break;
case STATUS_FORMAT_PORCELAIN:
- wt_shortstatus_print(&s, null_termination);
+ wt_porcelain_print(&s, null_termination);
break;
case STATUS_FORMAT_LONG:
s.verbose = verbose;
diff --git a/wt-status.c b/wt-status.c
index 696c6b0bf1eac0282fbd6e140f5ddda66d7f5a93..756defea1a4d5ee38700608cf4ed231c27f9a294 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
wt_shortstatus_untracked(null_termination, it, s);
}
}
+
+void wt_porcelain_print(struct wt_status *s, int null_termination)
+{
+ s->use_color = 0;
+ wt_shortstatus_print(s, null_termination);
+}
diff --git a/wt-status.h b/wt-status.h
index 39c9aef7a53bb7063c7c344f18426a9794e46cdc..a4bddcf8db5840de33c10be80864084fc596ea24 100644 (file)
--- a/wt-status.h
+++ b/wt-status.h
void wt_status_collect(struct wt_status *s);
void wt_shortstatus_print(struct wt_status *s, int null_termination);
+void wt_porcelain_print(struct wt_status *s, int null_termination);
#endif /* STATUS_H */