From: Junio C Hamano Date: Sun, 10 Nov 2019 09:02:12 +0000 (+0900) Subject: Merge branch 'pw/post-commit-from-sequencer' X-Git-Tag: v2.25.0-rc0~148 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c8c0a0d78b0e0ee50ba13823f0cfbee05334461;p=thirdparty%2Fgit.git Merge branch 'pw/post-commit-from-sequencer' "rebase -i" ceased to run post-commit hook by mistake in an earlier update, which has been corrected. * pw/post-commit-from-sequencer: sequencer: run post-commit hook move run_commit_hook() to libgit and use it there sequencer.h fix placement of #endif t3404: remove uneeded calls to set_fake_editor t3404: set $EDITOR in subshell t3404: remove unnecessary subshell --- 5c8c0a0d78b0e0ee50ba13823f0cfbee05334461 diff --cc sequencer.h index 574260f621,ac66892d71..9f9ae291e3 --- a/sequencer.h +++ b/sequencer.h @@@ -205,8 -198,7 +205,7 @@@ int read_author_script(const char *path void parse_strategy_opts(struct replay_opts *opts, char *raw_opts); int write_basic_state(struct replay_opts *opts, const char *head_name, struct commit *onto, const char *orig_head); -void sequencer_post_commit_cleanup(struct repository *r); +void sequencer_post_commit_cleanup(struct repository *r, int verbose); int sequencer_get_last_command(struct repository* r, enum replay_action *action); + #endif /* SEQUENCER_H */ diff --cc t/t3404-rebase-interactive.sh index d2dfbe46b9,c573c99069..bf0dc756d2 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@@ -225,13 -234,12 +229,15 @@@ test_expect_success 'reflog for the bra ' test_expect_success 'exchange two commits' ' - set_fake_editor && - FAKE_LINES="2 1" git rebase -i HEAD~2 && + ( + set_fake_editor && + FAKE_LINES="2 1" git rebase -i HEAD~2 + ) && test H = $(git cat-file commit HEAD^ | sed -ne \$p) && - test G = $(git cat-file commit HEAD | sed -ne \$p) + test G = $(git cat-file commit HEAD | sed -ne \$p) && + blob1=$(git rev-parse --short HEAD^:file1) && + blob2=$(git rev-parse --short HEAD:file1) && + commit=$(git rev-parse --short HEAD) ' test_expect_success 'stop on conflicting pick' ' @@@ -249,10 -257,9 +255,9 @@@ D ======= G - >>>>>>> 5d18e54... G + >>>>>>> $commit... G EOF git tag new-branch1 && - set_fake_editor && test_must_fail git rebase -i master && test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" && test_cmp expect .git/rebase-merge/patch && @@@ -999,9 -1059,11 +1057,11 @@@ test_expect_success 'rebase -i --root r test_expect_success 'rebase -i --root temporary sentinel commit' ' git checkout B && - set_fake_editor && - test_must_fail env FAKE_LINES="2" git rebase -i --root && + ( + set_fake_editor && + test_must_fail env FAKE_LINES="2" git rebase -i --root + ) && - git cat-file commit HEAD | grep "^tree 4b825dc642cb" && + git cat-file commit HEAD | grep "^tree $EMPTY_TREE" && git rebase --abort ' @@@ -1065,9 -1137,11 +1135,11 @@@ test_expect_success C_LOCALE_OUTPUT 're git checkout reword-original-root-branch && git reset --hard && git checkout conflict-branch && - set_fake_editor && - test_must_fail git rebase -f --onto HEAD~2 HEAD~ && - test_must_fail git rebase --edit-todo && + ( + set_fake_editor && - test_must_fail git rebase --onto HEAD~2 HEAD~ && ++ test_must_fail git rebase -f --onto HEAD~2 HEAD~ && + test_must_fail git rebase --edit-todo + ) && git rebase --abort ' @@@ -1427,11 -1537,14 +1535,13 @@@ test_expect_success 'editor saves as CR ) ' -SQ="'" test_expect_success 'rebase -i --gpg-sign=' ' test_when_finished "test_might_fail git rebase --abort" && - set_fake_editor && - FAKE_LINES="edit 1" git rebase -i --gpg-sign="\"S I Gner\"" HEAD^ \ - >out 2>err && + ( + set_fake_editor && + FAKE_LINES="edit 1" git rebase -i --gpg-sign="\"S I Gner\"" \ + HEAD^ >out 2>err + ) && test_i18ngrep "$SQ-S\"S I Gner\"$SQ" err '