<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-add--interactive.perl, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-06-13T17:05:02Z</updated>
<entry>
<title>add-interactive: Clarify “remaining hunks in the file”</title>
<updated>2010-06-13T17:05:02Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-06-13T03:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=74e42ce122bfcbd2e1a06395b80d6a4b44580148'/>
<id>urn:sha1:74e42ce122bfcbd2e1a06395b80d6a4b44580148</id>
<content type='text'>
The "a" and "d" commands to ‘add --patch’ (accept/reject rest of file)
interact with "j", "g", and "/" (skip some hunks) in a perhaps
confusing way: after accepting or rejecting all _later_ hunks in the
file, they return to the earlier, skipped hunks and prompt the user
about them again.

This behavior can be very useful in practice.  One can still accept or
reject _all_ undecided hunks in a file by using the "g" command to
move to hunk #1 first.

Reported-by: Frédéric Brière &lt;fbriere@fbriere.net&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-add--interactive-delete'</title>
<updated>2010-03-07T20:47:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-07T20:47:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93825874671ae15296442b1e7e39166c1754c934'/>
<id>urn:sha1:93825874671ae15296442b1e7e39166c1754c934</id>
<content type='text'>
* jk/maint-add--interactive-delete:
  add-interactive: fix bogus diff header line ordering
</content>
</entry>
<entry>
<title>add-interactive: fix bogus diff header line ordering</title>
<updated>2010-02-23T03:23:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-02-23T01:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e1327ed5fbaca0af44db89d60c33b641e2f21ee1'/>
<id>urn:sha1:e1327ed5fbaca0af44db89d60c33b641e2f21ee1</id>
<content type='text'>
When we look at a patch for adding hunks interactively, we
first split it into a header and a list of hunks. Some of
the header lines, such as mode changes and deletion, however,
become their own selectable hunks. Later when we reassemble
the patch, we simply concatenate the header and the selected
hunks. This leads to patches like this:

  diff --git a/file b/file
  index d95f3ad..0000000
  --- a/file
  +++ /dev/null
  deleted file mode 100644
  @@ -1 +0,0 @@
  -content

Notice how the deletion comes _after_ the ---/+++ lines,
when it should come before.

In many cases, we can get away with this as git-apply
accepts the slightly bogus input. However, in the specific
case of a deletion line that is being applied via "apply
-R", this malformed patch triggers an assert in git-apply.
This comes up when discarding a deletion via "git checkout
-p".

Rather than try to make git-apply accept our odd input,
let's just reassemble the patch in the correct order.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2009-12-09T06:47:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-12-09T06:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff86bdd5cac70850eea4791bea78efa19b228ebe'/>
<id>urn:sha1:ff86bdd5cac70850eea4791bea78efa19b228ebe</id>
<content type='text'>
* maint:
  add-interactive: fix deletion of non-empty files
  pull: clarify advice for the unconfigured error case
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-add-p-delete-fix' into maint</title>
<updated>2009-12-09T06:37:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-12-09T06:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a876433c5fc27cc14860dea3d608ab4e0ff62380'/>
<id>urn:sha1:a876433c5fc27cc14860dea3d608ab4e0ff62380</id>
<content type='text'>
* jk/maint-add-p-delete-fix:
  add-interactive: fix deletion of non-empty files
</content>
</entry>
<entry>
<title>add-interactive: fix deletion of non-empty files</title>
<updated>2009-12-08T07:52:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-12-08T07:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8947fdd598848b8ceb2cea9ff42e906c946eae5c'/>
<id>urn:sha1:8947fdd598848b8ceb2cea9ff42e906c946eae5c</id>
<content type='text'>
Commit 24ab81a fixed the deletion of empty files, but broke
deletion of non-empty files. The approach it took was to
factor out the "deleted" line from the patch header into its
own hunk, the same way we do for mode changes. However,
unlike mode changes, we only showed the special "delete this
file" hunk if there were no other hunks. Otherwise, the user
would annoyingly be presented with _two_ hunks: one for
deleting the file and one for deleting the content.

This meant that in the non-empty case, we forgot about the
deleted line entirely, and we submitted a bogus patch to
git-apply (with "/dev/null" as the destination file, but not
marked as a deletion).

Instead, this patch combines the file deletion hunk and the
content deletion hunk (if there is one) into a single
deletion hunk which is either staged or not.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jn/editor-pager'</title>
<updated>2009-11-21T07:48:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-11-21T07:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=376f39fbea0dfb31402abda878a7b0018f6a6161'/>
<id>urn:sha1:376f39fbea0dfb31402abda878a7b0018f6a6161</id>
<content type='text'>
* jn/editor-pager:
  Provide a build time default-pager setting
  Provide a build time default-editor setting
  am -i, git-svn: use "git var GIT_PAGER"
  add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"
  Teach git var about GIT_PAGER
  Teach git var about GIT_EDITOR
  Suppress warnings from "git var -l"
  Do not use VISUAL editor on dumb terminals
  Handle more shell metacharacters in editor names
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-add-p-empty' into maint</title>
<updated>2009-11-16T08:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-11-16T08:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e9cb8666bae6a5c8adcb26e3f46b8a5fe5be589'/>
<id>urn:sha1:5e9cb8666bae6a5c8adcb26e3f46b8a5fe5be589</id>
<content type='text'>
* jk/maint-add-p-empty:
  add-interactive: handle deletion of empty files
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-add-p-empty'</title>
<updated>2009-11-16T00:40:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-11-16T00:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3176bd0b0da232207df99802bd714f51bc10f153'/>
<id>urn:sha1:3176bd0b0da232207df99802bd714f51bc10f153</id>
<content type='text'>
* jk/maint-add-p-empty:
  add-interactive: handle deletion of empty files
</content>
</entry>
<entry>
<title>add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"</title>
<updated>2009-11-13T20:20:50Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2009-10-31T01:42:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4479f074760a788dd4e353b8c86a7d735afc53e'/>
<id>urn:sha1:b4479f074760a788dd4e353b8c86a7d735afc53e</id>
<content type='text'>
Use the new "git var GIT_EDITOR" feature to decide what editor to
use, instead of duplicating its logic elsewhere.  This should make
the behavior of commands in edge cases (e.g., editor names with
spaces) a little more consistent.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
