Skip to content

commit: fix advice for empty commits during rebases

Johannes Schindelin via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cherry-pick: add test for `--skip` advice in `git commit`t/t3510-cherry-pick-sequence.sh+2 -10 replies
2/3sequencer: export the function to get the path of `.git/rebase-merge/`sequencer.c sequencer.h+3 -20 replies
3/3commit: give correct advice for empty commit during a rebasebuiltin/commit.c t/t3403-rebase-skip.sh+33 -97 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchJohannes Schindelin
SeriesOriginal-patch-by
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] commit: fix advice for empty commits during rebases

In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02), we introduced a helpful message that suggests to run git cherry-pick --skip (instead of the previous message that talked about git reset) when a cherry-pick failed due to an empty patch.

However, the same message is displayed during a rebase, when the patch to-be-committed is empty. In this case, git reset would also have worked, but git cherry-pick --skip does not work. This is a regression introduced in this cycle.

Let's be more careful here.

Johannes Schindelin (3):
cherry-pick: add test for --skip advice in git commit
sequencer: export the function to get the path of .git/rebase-merge/
commit: give correct advice for empty commit during a rebase

 builtin/commit.c                | 33 ++++++++++++++++++++++++---------
 sequencer.c                     |  4 ++--
 sequencer.h                     |  1 +
 t/t3403-rebase-skip.sh          |  9 +++++++++
 t/t3510-cherry-pick-sequence.sh |  3 ++-
 5 files changed, 38 insertions(+), 12 deletions(-)

base-commit: d966095db01190a2196e31195ea6fa0c722aa732
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-417%2Fdscho%2Ffix-commit-advice-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-417/dscho/fix-commit-advice-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/417

Signature · 1 line
gitgitgadget