diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-01-20 17:07:04 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-01-20 17:07:04 -0800 |
| commit | 28f04f34636f46f7848be9ce9b36cec6d3554f32 (patch) | |
| tree | c4cb95bf6aaca52f84c675a90dae539941bd162c /builtin/commit.c | |
| parent | Merge branch 'ap/log-mailmap' (diff) | |
| parent | commit: make default of "cleanup" option configurable (diff) | |
| download | git-28f04f34636f46f7848be9ce9b36cec6d3554f32.tar.gz git-28f04f34636f46f7848be9ce9b36cec6d3554f32.zip | |
Merge branch 'rt/commit-cleanup-config'
Add a configuration variable to set default clean-up mode other
than "strip".
* rt/commit-cleanup-config:
commit: make default of "cleanup" option configurable
Diffstat (limited to 'builtin/commit.c')
| -rw-r--r-- | builtin/commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index d6dd3df8b1..7c2a3d48b4 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -103,7 +103,7 @@ static enum { CLEANUP_NONE, CLEANUP_ALL } cleanup_mode; -static char *cleanup_arg; +static const char *cleanup_arg; static enum commit_whence whence; static int use_editor = 1, include_status = 1; @@ -1320,6 +1320,8 @@ static int git_commit_config(const char *k, const char *v, void *cb) include_status = git_config_bool(k, v); return 0; } + if (!strcmp(k, "commit.cleanup")) + return git_config_string(&cleanup_arg, k, v); status = git_gpg_config(k, v, NULL); if (status) |
