Skip to content

Allow "no-op hunks" when editing the diff in git add -e

Johannes Schindelin via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1apply --recount: allow "no-op hunks"apply.c t/t4136-apply-check.sh+13 -11 reply

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchJosh Steadmon
1/1R-b

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/1] Allow "no-op hunks" when editing the diff in git add -e

I use git add -e frequently. Often there are multiple hunks and I end up deleting the + lines and converting the - lines to context lines, as I like to stage massive changes in an incremental fashion (and commit those staged changes incrementally, too).

Some time after I invented git add -e, this feature was broken, and I had to start identifying and deleting those hunks with no changes.

I finally got around to find the regression, and to fix it. Here is the outcome of this effort.

Johannes Schindelin (1):
apply --recount: allow "no-op hunks"

 apply.c                |  2 +-
 t/t4136-apply-check.sh | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

base-commit: 8858448bb49332d353febc078ce4a3abcc962efe
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-74%2Fdscho%2Fapply-recount-empty-hunk-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-74/dscho/apply-recount-empty-hunk-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/74

Signature · 1 line
gitgitgadget