summaryrefslogtreecommitdiff
path: root/builtin/rebase--helper.c
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2017-11-24 11:07:56 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-24 22:44:18 +0900
commitb36c5908135889bd9c48a8d44d4e07f59bf799ef (patch)
tree5319aebe315eb106d7b4e47164740c50295ce97d /builtin/rebase--helper.c
parentsequencer: simplify adding Signed-off-by: trailer (diff)
downloadtgif-b36c5908135889bd9c48a8d44d4e07f59bf799ef.tar.xz
sequencer: load commit related config
Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Note that we interpret commit.cleanup=scissors to mean COMMIT_MSG_CLEANUP_SPACE to be consistent with 'git commit' Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase--helper.c')
-rw-r--r--builtin/rebase--helper.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c
index f8519363a3..68194d3aed 100644
--- a/builtin/rebase--helper.c
+++ b/builtin/rebase--helper.c
@@ -9,6 +9,17 @@ static const char * const builtin_rebase_helper_usage[] = {
NULL
};
+static int git_rebase_helper_config(const char *k, const char *v, void *cb)
+{
+ int status;
+
+ status = git_sequencer_config(k, v, NULL);
+ if (status)
+ return status;
+
+ return git_default_config(k, v, NULL);
+}
+
int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
{
struct replay_opts opts = REPLAY_OPTS_INIT;
@@ -39,7 +50,7 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
OPT_END()
};
- git_config(git_default_config, NULL);
+ git_config(git_rebase_helper_config, NULL);
opts.action = REPLAY_INTERACTIVE_REBASE;
opts.allow_ff = 1;