From c1b5d0194b98bd3d0acc9cec7070808fbbe6a740 Mon Sep 17 00:00:00 2001 From: Liam Beguin Date: Sat, 17 Jun 2017 18:30:51 -0400 Subject: status: add optional stash count information Introduce '--show-stash' and its configuration option 'status.showStash' to allow git-status to show information about currently stashed entries. Signed-off-by: Liam Beguin Signed-off-by: Junio C Hamano --- builtin/commit.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builtin/commit.c') diff --git a/builtin/commit.c b/builtin/commit.c index ef52457eff..c089fb87e3 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1295,6 +1295,10 @@ static int git_status_config(const char *k, const char *v, void *cb) status_deferred_config.show_branch = git_config_bool(k, v); return 0; } + if (!strcmp(k, "status.showstash")) { + s->show_stash = git_config_bool(k, v); + return 0; + } if (!strcmp(k, "status.color") || !strcmp(k, "color.status")) { s->use_color = git_config_colorbool(k, v); return 0; @@ -1343,6 +1347,8 @@ int cmd_status(int argc, const char **argv, const char *prefix) N_("show status concisely"), STATUS_FORMAT_SHORT), OPT_BOOL('b', "branch", &s.show_branch, N_("show branch information")), + OPT_BOOL(0, "show-stash", &s.show_stash, + N_("show stash information")), { OPTION_CALLBACK, 0, "porcelain", &status_format, N_("version"), N_("machine-readable output"), PARSE_OPT_OPTARG, opt_parse_porcelain }, -- cgit v1.2.1