author | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Sep 2010 16:35:58 +0000 (09:35 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Sep 2010 16:35:58 +0000 (09:35 -0700) |
* rr/fmt-merge-msg:
t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
merge: Make 'merge.log' an integer or boolean option
merge: Make '--log' an integer option for number of shortlog entries
fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len
Conflicts:
builtin/merge.c
t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
merge: Make 'merge.log' an integer or boolean option
merge: Make '--log' an integer option for number of shortlog entries
fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len
Conflicts:
builtin/merge.c
1 | 2 | |||
---|---|---|---|---|
Documentation/merge-config.txt | patch | | diff1 | | diff2 | | blob | history |
builtin.h | patch | | diff1 | | diff2 | | blob | history |
builtin/fmt-merge-msg.c | patch | | diff1 | | diff2 | | blob | history |
builtin/merge.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/merge-config.txt
Simple merge
diff --cc builtin.h
index 0398d247400e55f2a2ededc054902374c7516d5b,09b94ea4409ed497aff68012baad897de961e80d..f2a25a084736e573f560672fabc9c6214997f437
+++ b/builtin.h
extern const char git_usage_string[];
extern const char git_more_info_string[];
-extern void list_common_cmds_help(void);
-extern const char *help_unknown_cmd(const char *cmd);
extern void prune_packed_objects(int);
- extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
- struct strbuf *out);
- extern int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out);
+ extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
+ int merge_title, int shortlog_len);
extern int commit_notes(struct notes_tree *t, const char *msg);
struct notes_rewrite_cfg {
diff --cc builtin/fmt-merge-msg.c
Simple merge
diff --cc builtin/merge.c
index 5f65c0c8a6eacd4c6d05602ad9de2821ec62a034,1e9c898aec2834577689b430739607a50508498a..2dba3b9901cbdca9aee279339ecd3537e15e39da
--- 1/builtin/merge.c
--- 2/builtin/merge.c
+++ b/builtin/merge.c
return git_config_string(&pull_twohead, k, v);
else if (!strcmp(k, "pull.octopus"))
return git_config_string(&pull_octopus, k, v);
- else if (!strcmp(k, "merge.log") || !strcmp(k, "merge.summary"))
- option_log = git_config_bool(k, v);
+ else if (!strcmp(k, "merge.renormalize"))
+ option_renormalize = git_config_bool(k, v);
+ else if (!strcmp(k, "merge.log") || !strcmp(k, "merge.summary")) {
+ 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);
}