git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] Allow "no-op hunks" when editing the diff in git add -e

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 12, 2018, 20:54 UTC
Message-ID
<pull.74.git.gitgitgadget@gmail.com>

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
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 3 in “Allow "no-op hunks" when editing the diff in git add -e”
  1. 0/1 Allow "no-op hunks" when editing the diff in git add -eJohannes Schindelin via GitGitGadget, Nov 12, 2018
  2. 1/1 apply --recount: allow "no-op hunks"Johannes Schindelin via GitGitGadget, Nov 12, 2018
  3. Josh SteadmonNov 12, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.