Skip to content

Commit 0f57f73

Browse files
committed
Merge branch 'pw/sequencer-in-process-commit'
The sequencer infrastructure is shared across "git cherry-pick", "git rebase -i", etc., and has always spawned "git commit" when it needs to create a commit. It has been taught to do so internally, when able, by reusing the codepath "git commit" itself uses, which gives performance boost for a few tens of percents in some sample scenarios. * pw/sequencer-in-process-commit: sequencer: run 'prepare-commit-msg' hook t7505: add tests for cherry-pick and rebase -i/-p t7505: style fixes sequencer: assign only free()able strings to gpg_sign sequencer: improve config handling t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1 sequencer: try to commit without forking 'git commit' sequencer: load commit related config sequencer: simplify adding Signed-off-by: trailer commit: move print_commit_summary() to libgit commit: move post-rewrite code to libgit Add a function to update HEAD after creating a commit commit: move empty message checks to libgit t3404: check intermediate squash messages
2 parents dd0c256 + 66618a5 commit 0f57f73

11 files changed

+765
-280
lines changed

builtin/commit.c

Lines changed: 31 additions & 260 deletions
Large diffs are not rendered by default.

builtin/rebase--helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
4343
OPT_END()
4444
};
4545

46-
git_config(git_default_config, NULL);
46+
sequencer_init_config(&opts);
4747
git_config_get_bool("rebase.abbreviatecommands", &abbreviate_commands);
4848

4949
opts.action = REPLAY_INTERACTIVE_REBASE;

builtin/revert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ int cmd_revert(int argc, const char **argv, const char *prefix)
208208
if (isatty(0))
209209
opts.edit = 1;
210210
opts.action = REPLAY_REVERT;
211-
git_config(git_default_config, NULL);
211+
sequencer_init_config(&opts);
212212
res = run_sequencer(argc, argv, &opts);
213213
if (res < 0)
214214
die(_("revert failed"));
@@ -221,7 +221,7 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
221221
int res;
222222

223223
opts.action = REPLAY_PICK;
224-
git_config(git_default_config, NULL);
224+
sequencer_init_config(&opts);
225225
res = run_sequencer(argc, argv, &opts);
226226
if (res < 0)
227227
die(_("cherry-pick failed"));

0 commit comments

Comments
 (0)