rebase.c: honour --no-gpg-sign
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
274b9cc253
commit
c241371c04
@ -1592,6 +1592,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
|
||||
|
||||
options.allow_empty_message = 1;
|
||||
git_config(rebase_config, &options);
|
||||
/* options.gpg_sign_opt will be either "-S" or NULL */
|
||||
gpg_sign = options.gpg_sign_opt ? "" : NULL;
|
||||
FREE_AND_NULL(options.gpg_sign_opt);
|
||||
|
||||
if (options.use_legacy_rebase ||
|
||||
!git_env_bool("GIT_TEST_REBASE_USE_BUILTIN", -1))
|
||||
@ -1822,10 +1825,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
|
||||
if (options.empty != EMPTY_UNSPECIFIED)
|
||||
imply_merge(&options, "--empty");
|
||||
|
||||
if (gpg_sign) {
|
||||
free(options.gpg_sign_opt);
|
||||
if (gpg_sign)
|
||||
options.gpg_sign_opt = xstrfmt("-S%s", gpg_sign);
|
||||
}
|
||||
|
||||
if (exec.nr) {
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user