summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96e9420)
raw | patch | inline | side by side (parent: 96e9420)
author | Ramkumar Ramachandra <artagnon@gmail.com> | |
Wed, 8 Sep 2010 17:59:55 +0000 (23:29 +0530) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 9 Sep 2010 18:39:23 +0000 (11:39 -0700) |
Make 'merge.log' an integer or boolean option to set the number of
shortlog entries to display in the merge commit. Note that it defaults
to false, and that true means a default value of 20. Also update
corresponding documentation.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Thanks-to: Jonathan Nieder <jrnieder@gmail.com>
Thanks-to: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
shortlog entries to display in the merge commit. Note that it defaults
to false, and that true means a default value of 20. Also update
corresponding documentation.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Thanks-to: Jonathan Nieder <jrnieder@gmail.com>
Thanks-to: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-fmt-merge-msg.txt | patch | blob | history | |
Documentation/merge-config.txt | patch | blob | history | |
builtin/fmt-merge-msg.c | patch | blob | history | |
builtin/merge.c | patch | blob | history |
index f04a9ff0e0299bdb6f33d10f5674cc19dc2777f7..40dba8c0a9f308064f67d8f38ce8a22b2a42a77c 100644 (file)
-------------
merge.log::
- Whether to include summaries of merged commits in newly
- merge commit messages. False by default.
+ In addition to branch names, populate the log message with at
+ most the specified number of one-line descriptions from the
+ actual commits that are being merged. Defaults to false, and
+ true is a synoym for 20.
merge.summary::
Synonym to `merge.log`; this is deprecated and will be removed in
index a403155052299dd0aaafd6bdfe0fec92d0d0ac7c..acbe1e16b2c6b3ea5f7cfe20a9a3794c6e982ac8 100644 (file)
marker and the original text before the `=======` marker.
merge.log::
- Whether to include summaries of merged commits in newly created
- merge commit messages. False by default.
+ In addition to branch names, populate the log message with at
+ most the specified number of one-line descriptions from the
+ actual commits that are being merged. Defaults to false, and
+ true is a synoym for 20.
merge.renameLimit::
The number of files to consider when performing rename detection
index 455e7c67f885e7a8584066fca6f759ddd27443db..d2eed43ab5c165f3b0ed10ba3df4296fc4679dd2 100644 (file)
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
static int fmt_merge_msg_config(const char *key, const char *value, void *cb)
{
- static int found_merge_log = 0;
- if (!strcmp("merge.log", key)) {
- found_merge_log = 1;
- shortlog_len = git_config_bool(key, value) ? DEFAULT_MERGE_LOG_LEN : 0;
- return 0;
- }
- if (!found_merge_log && !strcmp("merge.summary", key)) {
- shortlog_len = git_config_bool(key, value) ? DEFAULT_MERGE_LOG_LEN : 0;
- return 0;
+ if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
+ int is_bool;
+ shortlog_len = git_config_bool_or_int(key, value, &is_bool);
+ if (!is_bool && shortlog_len < 0)
+ return error("%s: negative length %s", key, value);
+ if (is_bool && shortlog_len)
+ shortlog_len = DEFAULT_MERGE_LOG_LEN;
}
return 0;
}
diff --git a/builtin/merge.c b/builtin/merge.c
index 9e4733d25f94a4185acb99cbc53255cee2654c1b..1e9c898aec2834577689b430739607a50508498a 100644 (file)
--- a/builtin/merge.c
+++ b/builtin/merge.c
else if (!strcmp(k, "pull.octopus"))
return git_config_string(&pull_octopus, k, v);
else if (!strcmp(k, "merge.log") || !strcmp(k, "merge.summary")) {
- shortlog_len = git_config_bool(k, v) ? DEFAULT_MERGE_LOG_LEN : 0;
+ int is_bool;
+ shortlog_len = git_config_bool_or_int(k, v, &is_bool);
+ if (!is_bool && shortlog_len < 0)
+ return error("%s: negative length %s", k, v);
+ if (is_bool && shortlog_len)
+ shortlog_len = DEFAULT_MERGE_LOG_LEN;
return 0;
}
return git_diff_ui_config(k, v, cb);