summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-23 21:51:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-23 21:51:59 (GMT)
commit1a22bd31f0a5130ce6c934951a5526ceb774c2be (patch)
tree5fc1ad424560163872206ebf3c90a1ca6e945b5f /builtin/commit.c
parent3e7a5b489e45ae8a3a0b222893d58b172d883136 (diff)
parent0e254bbd22ba3f62c0bbf5055c307391a5920eaa (diff)
downloadgit-1a22bd31f0a5130ce6c934951a5526ceb774c2be.zip
git-1a22bd31f0a5130ce6c934951a5526ceb774c2be.tar.gz
git-1a22bd31f0a5130ce6c934951a5526ceb774c2be.tar.bz2
Merge branch 'jg/status-config'
"git status" learned status.branch and status.short configuration variables to use --branch and --short options by default (override with --no-branch and --no-short options from the command line). * jg/status-config: status: introduce status.branch to enable --branch by default status: introduce status.short to enable --short by default
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 1621dfc..b589ce0 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1112,6 +1112,17 @@ static int git_status_config(const char *k, const char *v, void *cb)
s->submodule_summary = -1;
return 0;
}
+ if (!strcmp(k, "status.short")) {
+ if (git_config_bool(k, v))
+ status_format = STATUS_FORMAT_SHORT;
+ else
+ status_format = STATUS_FORMAT_NONE;
+ return 0;
+ }
+ if (!strcmp(k, "status.branch")) {
+ s->show_branch = 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;