summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43acdf2)
raw | patch | inline | side by side (parent: 43acdf2)
author | Heiko Voigt <hvoigt@hvoigt.net> | |
Wed, 1 Apr 2009 17:51:54 +0000 (19:51 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 6 Apr 2009 07:12:32 +0000 (00:12 -0700) |
If you regularly create patches which require a Signed-off: line you may
want to make it your default to add that line. It also helps you not to forget
to add the -s/--signoff switch.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
want to make it your default to add that line. It also helps you not to forget
to add the -s/--signoff switch.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
Documentation/git-format-patch.txt | patch | blob | history | |
builtin-log.c | patch | blob | history |
index ad22cb875e54057d7a8246b7c28f44ff90cfd14a..27cb7f14080210fac4dc9b0966dee326aeeaf394 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
A true boolean value is the same as `shallow`, and a false
value disables threading.
+format.signoff::
+ A boolean value which lets you enable the `-s/--signoff` option of
+ format-patch by default. *Note:* Adding the Signed-off-by: line to a
+ patch should be a conscious act and means that you certify you have
+ the rights to submit this work under the same open source license.
+ Please see the 'SubmittingPatches' document for further discussion.
+
gc.aggressiveWindow::
The window size parameter used in the delta compression
algorithm used by 'git-gc --aggressive'. This defaults
index db3bdb5657e4c4c55122ec7f0cd735e623f1dec2..eb2fbcff1a103c2b973eccbb449a20d3b68f157f 100644 (file)
numbered = auto
cc = <email>
attach [ = mime-boundary-string ]
+ signoff = true
------------
diff --git a/builtin-log.c b/builtin-log.c
index 27bc0dce23d364bd763b7ca92316eef5966c5908..eb2c0541b5ab833fb5c5f9b73eaa752d2e80e9d0 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
#define THREAD_SHALLOW 1
#define THREAD_DEEP 2
static int thread = 0;
+static int do_signoff = 0;
static int git_format_config(const char *var, const char *value, void *cb)
{
thread = git_config_bool(var, value) && THREAD_SHALLOW;
return 0;
}
+ if (!strcmp(var, "format.signoff")) {
+ do_signoff = git_config_bool(var, value);
+ return 0;
+ }
return git_log_config(var, value, cb);
}
}
else if (!strcmp(argv[i], "--signoff") ||
!strcmp(argv[i], "-s")) {
- const char *committer;
- const char *endpos;
- committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
- endpos = strchr(committer, '>');
- if (!endpos)
- die("bogus committer info %s", committer);
- add_signoff = xmemdupz(committer, endpos - committer + 1);
+ do_signoff = 1;
}
else if (!strcmp(argv[i], "--attach")) {
rev.mime_boundary = git_version_string;
}
argc = j;
+ if (do_signoff) {
+ const char *committer;
+ const char *endpos;
+ committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
+ endpos = strchr(committer, '>');
+ if (!endpos)
+ die("bogus committer info %s", committer);
+ add_signoff = xmemdupz(committer, endpos - committer + 1);
+ }
+
for (i = 0; i < extra_hdr_nr; i++) {
strbuf_addstr(&buf, extra_hdr[i]);
strbuf_addch(&buf, '\n');