diff options
author | W. Trevor King <wking@tremily.us> | 2017-10-12 11:35:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-13 10:47:36 +0900 |
commit | 3a4d2c743750dbc3c8165f362c0a3c0d1c775c8a (patch) | |
tree | 4d8e47aca3cbe09b993d6013a8f2dac41be8f512 /builtin | |
parent | 111ef79afe185f8731920569450f6a65320f5d5f (diff) | |
download | git-3a4d2c743750dbc3c8165f362c0a3c0d1c775c8a.tar.gz git-3a4d2c743750dbc3c8165f362c0a3c0d1c775c8a.tar.xz |
pull: pass --signoff/--no-signoff to "git merge"
merge can take --signoff, but without pull passing --signoff down, it
is inconvenient to use; allow 'pull' to take the option and pass it
through.
The order of options in merge-options.txt is mostly alphabetical by
long option since 7c85d274 (Documentation/merge-options.txt: order
options in alphabetical groups, 2009-10-22). The long-option bit
didn't make it into the commit message, but it's under the fold in
[1]. I've put --signoff between --log and --stat to preserve the
alphabetical order.
[1]: https://public-inbox.org/git/87iqe7zspn.fsf@jondo.cante.net/
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pull.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 6f772e8a2..0413c78a3 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -86,6 +86,7 @@ static int recurse_submodules = RECURSE_SUBMODULES_DEFAULT; static enum rebase_type opt_rebase = -1; static char *opt_diffstat; static char *opt_log; +static char *opt_signoff; static char *opt_squash; static char *opt_commit; static char *opt_edit; @@ -142,6 +143,9 @@ static struct option pull_options[] = { OPT_PASSTHRU(0, "log", &opt_log, N_("n"), N_("add (at most <n>) entries from shortlog to merge commit message"), PARSE_OPT_OPTARG), + OPT_PASSTHRU(0, "signoff", &opt_signoff, NULL, + N_("add Signed-off-by:"), + PARSE_OPT_OPTARG), OPT_PASSTHRU(0, "squash", &opt_squash, NULL, N_("create a single commit instead of doing a merge"), PARSE_OPT_NOARG), @@ -594,6 +598,8 @@ static int run_merge(void) argv_array_push(&args, opt_diffstat); if (opt_log) argv_array_push(&args, opt_log); + if (opt_signoff) + argv_array_push(&args, opt_signoff); if (opt_squash) argv_array_push(&args, opt_squash); if (opt_commit) |