commit: add signoff config variable
PATCH 1/1 commit: add signoff config variable
Add a configuration variable, based on format.signoff, to automatically signoff commit messages.
--- Documentation/config/commit.txt | 7 +++++++ builtin/commit.c | 4 ++++ 2 files changed, 11 insertions(+)
Documentation/config/commit.txt +7 -0
@@ -27,3 +27,10 @@ commit.template:: commit.verbose:: A boolean or int to specify the level of verbose with `git commit`. See linkgit:git-commit[1]. + +commit.signOff:: + A boolean value which lets you enable the `-s/--signoff` option of + `git commit` 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.
builtin/commit.c +4 -0
@@ -1456,6 +1456,10 @@ static int git_commit_config(const char *k, const char *v, void *cb) config_commit_verbose =git_config_bool_or_int (k, v, &is_bool);return 0 ; } +if (!strcmp (k,"commit.signoff" )) { + signoff =git_config_bool (k, v); +return 0 ; + } status =git_gpg_config (k, v,NULL );if (status)
Signature · 1 line
2.21.0.777.g83232e38648b
Quoted 4 lines · Liam Beguin
Add a configuration variable, based on format.signoff, to automatically signoff commit messages.
Signed-off-by Liam Beguin <[email protected]>
This has been proposed several times. It may be interesting to look through the history of the list and examine why it hasn't been accepted as a feature. A few attempts are chronicled here:
https://public-inbox.org/git/?q=commit.signoff
This is, however, achievable with a commit-msg hook or using "git interpret-trailers" if you are certain this is what you want to do.
Signature · 2 lines
brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204
Hi,
Sorry for sending this without checking the archives before... I understand why this would not be such a good idea given the legal meaning attached to it.
Thanks,
Liam
Quoted 17 lines · brian m. carlson
Quoted 4 lines · Liam Beguin
Add a configuration variable, based on format.signoff, to automatically signoff commit messages.
Signed-off-by Liam Beguin <[email protected]>This has been proposed several times. It may be interesting to look through the history of the list and examine why it hasn't been accepted as a feature. A few attempts are chronicled here:
https://public-inbox.org/git/?q=commit.signoffThis is, however, achievable with a commit-msg hook or using "git interpret-trailers" if you are certain this is what you want to do. --
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204