diff options
author | Liam Beguin <liambeguin@gmail.com> | 2017-06-17 18:30:51 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-18 22:17:47 -0700 |
commit | c1b5d0194b98bd3d0acc9cec7070808fbbe6a740 (patch) | |
tree | 05c81f1a33815352c41e1a0b17bdeb005913379e /builtin/commit.c | |
parent | e01db917d8e5c66f9f90bf8c44995cf47200273a (diff) | |
download | git-c1b5d0194b98bd3d0acc9cec7070808fbbe6a740.tar.gz |
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 <liambeguin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 }, |