<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-add--interactive.perl, branch v1.6.4.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2009-08-26T18:22:00Z</updated>
<entry>
<title>Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3</title>
<updated>2009-08-26T18:22:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-08-26T18:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9e4a90ba19033d25dca1eea495b0a8c5f06efbc6'/>
<id>urn:sha1:9e4a90ba19033d25dca1eea495b0a8c5f06efbc6</id>
<content type='text'>
* tr/maint-1.6.3-add-p-modeonly-fix:
  add -p: do not attempt to coalesce mode changes
  git add -p: demonstrate failure when staging both mode and hunk
</content>
</entry>
<entry>
<title>add -p: do not attempt to coalesce mode changes</title>
<updated>2009-08-15T17:36:59Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-08-15T13:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3d792161b1c86632d5331bb30d6b7c6b17261f38'/>
<id>urn:sha1:3d792161b1c86632d5331bb30d6b7c6b17261f38</id>
<content type='text'>
In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16),
we merged the interaction loops for mode changes and hunk staging.
This was fine at the time, because 0beee4c (git-add--interactive:
remove hunk coalescing, 2008-07-02) removed hunk coalescing.

However, in 7a26e65 (Revert "git-add--interactive: remove hunk
coalescing", 2009-05-16), we resurrected it.  Since then, the code
would attempt in vain to merge mode changes with diff hunks,
corrupting both in the process.

We add a check to the coalescing loop to ensure it only looks at diff
hunks, thus skipping mode changes.

Noticed-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add -i: do not dump patch during application</title>
<updated>2009-06-03T07:11:15Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-06-02T21:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8dc3a47c3edcee923225000e93f8052c50e5a004'/>
<id>urn:sha1:8dc3a47c3edcee923225000e93f8052c50e5a004</id>
<content type='text'>
Remove a debugging print that snuck in at 7a26e65 (Revert
"git-add--interactive: remove hunk coalescing", 2009-05-16).

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "git-add--interactive: remove hunk coalescing"</title>
<updated>2009-05-17T01:52:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-05-16T17:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7a26e653929025e11e689bc7d98365c9a0107dc9'/>
<id>urn:sha1:7a26e653929025e11e689bc7d98365c9a0107dc9</id>
<content type='text'>
This reverts commit 0beee4c6dec15292415e3d56075c16a76a22af54 but with a
bit of twist, as we have added "edit hunk manually" hack and we cannot
rely on the original line numbers of the hunks that were manually edited.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mm/maint-add-p-quit'</title>
<updated>2009-04-20T10:39:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-04-20T10:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=21590d5262f71b336926a9d2cec5b04b0aa6c4a0'/>
<id>urn:sha1:21590d5262f71b336926a9d2cec5b04b0aa6c4a0</id>
<content type='text'>
* mm/maint-add-p-quit:
  git add -p: add missing "q" to patch prompt
</content>
</entry>
<entry>
<title>git add -p: add missing "q" to patch prompt</title>
<updated>2009-04-20T10:38:44Z</updated>
<author>
<name>Wincent Colaiuta</name>
<email>win@wincent.com</email>
</author>
<published>2009-04-20T09:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a2fc8d65368a23a8a5f708b36c761c2d0d133ea6'/>
<id>urn:sha1:a2fc8d65368a23a8a5f708b36c761c2d0d133ea6</id>
<content type='text'>
Commit cbd3a01 added a new "q" subcommand to the "git add -p"
command loop, but forgot to add it to the prompt.

Signed-off-by: Wincent Colaiuta &lt;win@wincent.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add-interactive: refactor mode hunk handling</title>
<updated>2009-04-19T19:35:38Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-04-16T07:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7535e5a16aa7167074ac74ee1342814767a83a82'/>
<id>urn:sha1:7535e5a16aa7167074ac74ee1342814767a83a82</id>
<content type='text'>
The original implementation considered the mode separately
from the rest of the hunks, asking about it outside the main
hunk-selection loop. This patch instead places a mode change
as the first hunk in the loop. This has two advantages:

  1. less duplicated code (since we use the main selection
     loop). This also cleans up an inconsistency, which is
     that the main selection loop separates options with a
     comma, whereas the mode prompt used slashes.

  2. users can now skip the mode change and come back to it,
     search for it (via "/mode"), etc, as they can with other
     hunks.

To facilitate this, each hunk is now marked with a "type".
Mode hunks are not considered for splitting (which would
make no sense, and also confuses the split_hunk function),
nor are they editable. In theory, one could edit the mode
lines and change to a new mode. In practice, there are only
two modes that git cares about (0644 and 0755), so either
you want to move from one to the other or not (and you can
do that by staging or not staging).

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>git add -p: new "quit" command at the prompt.</title>
<updated>2009-04-19T19:35:37Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2009-04-10T14:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=cbd3a01ed803778b2377e0148448f7e617bc381a'/>
<id>urn:sha1:cbd3a01ed803778b2377e0148448f7e617bc381a</id>
<content type='text'>
There's already 'd' to stop staging hunks in a file, but no explicit
command to stop the interactive staging (for the current files and the
remaining ones).  Of course you can do 'd' and then ^C, but it would be
more intuitive to allow 'quit' action.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add-interactive: refactor mode hunk handling</title>
<updated>2009-04-16T08:06:52Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-04-16T07:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0392513fdc7e98f5ca5dff1ad80962c28029267b'/>
<id>urn:sha1:0392513fdc7e98f5ca5dff1ad80962c28029267b</id>
<content type='text'>
The original implementation considered the mode separately
from the rest of the hunks, asking about it outside the main
hunk-selection loop. This patch instead places a mode change
as the first hunk in the loop. This has two advantages:

  1. less duplicated code (since we use the main selection
     loop). This also cleans up an inconsistency, which is
     that the main selection loop separates options with a
     comma, whereas the mode prompt used slashes.

  2. users can now skip the mode change and come back to it,
     search for it (via "/mode"), etc, as they can with other
     hunks.

To facilitate this, each hunk is now marked with a "type".
Mode hunks are not considered for splitting (which would
make no sense, and also confuses the split_hunk function),
nor are they editable. In theory, one could edit the mode
lines and change to a new mode. In practice, there are only
two modes that git cares about (0644 and 0755), so either
you want to move from one to the other or not (and you can
do that by staging or not staging).

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>git add -p: new "quit" command at the prompt.</title>
<updated>2009-04-16T02:41:35Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2009-04-10T14:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9a7a1e03d5e530cdad98c41c109e3319c008ce69'/>
<id>urn:sha1:9a7a1e03d5e530cdad98c41c109e3319c008ce69</id>
<content type='text'>
There's already 'd' to stop staging hunks in a file, but no explicit
command to stop the interactive staging (for the current files and the
remaining ones).  Of course you can do 'd' and then ^C, but it would be
more intuitive to allow 'quit' action.

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