summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 88c447e)
raw | patch | inline | side by side (parent: 88c447e)
author | Alex Riesen <raa@limbo.localdomain> | |
Wed, 4 Jul 2007 10:37:27 +0000 (12:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jul 2007 19:39:58 +0000 (12:39 -0700) |
Because the --pretty can be given as --pretty=email which historically produced
mails with patches. IOW, exactly what git-format-patch does.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mails with patches. IOW, exactly what git-format-patch does.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-log.c | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index 5dc2c1c23061e4e25156a373c9692c026652b69a..13bae3110e05b804db22149e9eb366669a8147c7 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
#include "refs.h"
static int default_show_root = 1;
+static const char *fmt_patch_subject_prefix = "PATCH";
/* this is in builtin-diff.c */
void add_head(struct rev_info *revs);
rev->commit_format = CMIT_FMT_DEFAULT;
rev->verbose_header = 1;
rev->show_root_diff = default_show_root;
+ rev->subject_prefix = fmt_patch_subject_prefix;
argc = setup_revisions(argc, argv, rev, "HEAD");
if (rev->diffopt.pickaxe || rev->diffopt.filter)
rev->always_show_header = 0;
static int git_log_config(const char *var, const char *value)
{
+ if (!strcmp(var, "format.subjectprefix")) {
+ if (!value)
+ die("format.subjectprefix without value");
+ fmt_patch_subject_prefix = xstrdup(value);
+ return 0;
+ }
if (!strcmp(var, "log.showroot")) {
default_show_root = git_config_bool(var, value);
return 0;
static char *extra_headers = NULL;
static int extra_headers_size = 0;
-static const char *fmt_patch_subject_prefix = "PATCH";
static const char *fmt_patch_suffix = ".patch";
static int git_format_config(const char *var, const char *value)
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
return 0;
}
- if (!strcmp(var, "format.subjectprefix")) {
- if (!value)
- die("format.subjectprefix without value");
- fmt_patch_subject_prefix = xstrdup(value);
- return 0;
- }
return git_log_config(var, value);
}