<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-add--interactive.perl, branch v1.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.6.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.6.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2009-02-08T21:06:33Z</updated>
<entry>
<title>add -p: get rid of Git.pm warnings about unitialized values</title>
<updated>2009-02-08T21:06:33Z</updated>
<author>
<name>Stephan Beyer</name>
<email>s-beyer@gmx.net</email>
</author>
<published>2009-02-08T17:40:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9aad6cbaef3c459ff4953f5a22bbbc7abfc72800'/>
<id>urn:sha1:9aad6cbaef3c459ff4953f5a22bbbc7abfc72800</id>
<content type='text'>
After invoking git add -p I always got the warnings:

 Use of uninitialized value $_[3] in exec at Git.pm line 1282.
 Use of uninitialized value $args[2] in join or string at Git.pm line 1264.

A bisect showed that these warnings occur in a301973 "add -p: print errors
in separate color" the first time.

They can be reproduced by setting color.ui (or color.interactive) to "auto"
and unsetting color.interactive.help and color.interactive.error.
I am using Perl 5.10.0.

The reason of the warning is that color.interactive.error defaults to
color.interactive.help which defaults to nothing in the specific codepath.
It defaults to 'red bold' some lines above which could lead to the wrong
assumption that it always defaults to 'red bold' now.

This patch lets it default to 'red bold', blowing the warnings away.

Signed-off-by: Stephan Beyer &lt;s-beyer@gmx.net&gt;
Acked-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 -p: import Term::ReadKey with 'require'</title>
<updated>2009-02-07T08:37:36Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-02-06T19:30:01Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=748aa689bac2c1dd5d902815b0dec6364d20bf34'/>
<id>urn:sha1:748aa689bac2c1dd5d902815b0dec6364d20bf34</id>
<content type='text'>
eval{use...} is no good because the 'use' is evaluated at compile
time, so manually 'require' it.  We need to forward declare the
functions we use, otherwise Perl raises a compilation error.

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 -p: print errors in separate color</title>
<updated>2009-02-06T01:44:39Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-02-05T08:28:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a301973641f426ab42e5bf9faa6e4da5bd658148'/>
<id>urn:sha1:a301973641f426ab42e5bf9faa6e4da5bd658148</id>
<content type='text'>
Print interaction error messages in color.interactive.error, which
defaults to the value of color.interactive.help.

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 -p: prompt for single characters</title>
<updated>2009-02-06T01:44:10Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-02-05T08:28:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ca6ac7f1357df352fec247dc98a3e6784e6c3fea'/>
<id>urn:sha1:ca6ac7f1357df352fec247dc98a3e6784e6c3fea</id>
<content type='text'>
Use Term::ReadKey, if available and enabled with interactive.singlekey,
to let the user answer add -p's prompts by pressing a single key.  We're
not doing the same in the main 'add -i' interface because file selection
etc. may expect several characters.

Two commands take an argument: 'g' can easily cope since it'll just
offer a choice of chunks.  '/' now (unconditionally, even without
readkey) offers a chance to enter a regex if none was given.

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 -p: trap Ctrl-D in 'goto' mode</title>
<updated>2009-02-04T08:52:52Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-02-02T21:46:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=68c02d7c462e1748578209346f050a587c040139'/>
<id>urn:sha1:68c02d7c462e1748578209346f050a587c040139</id>
<content type='text'>
If the user hit Ctrl-D (EOF) while the script was in 'go to hunk?'
mode, it threw an undefined variable error.  Explicitly test for EOF
and have it re-enter the goto prompt loop.

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 -p: change prompt separator for 'g'</title>
<updated>2009-02-04T08:52:27Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-02-02T21:46:28Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4404b2e39236e6f9c5bff121fc920d7ec17f7b6d'/>
<id>urn:sha1:4404b2e39236e6f9c5bff121fc920d7ec17f7b6d</id>
<content type='text'>
57886bc (git-add -i/-p: Change prompt separater from slash to comma,
2008-11-27) changed the prompt separator to ',', but forgot to adapt
the 'g' (goto) command.

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>In add --patch, Handle K,k,J,j slightly more gracefully.</title>
<updated>2009-02-02T03:43:38Z</updated>
<author>
<name>William Pursell</name>
<email>bill.pursell@gmail.com</email>
</author>
<published>2008-11-27T04:08:03Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ace30ba813ed723534c3b4d223db6eddea417de7'/>
<id>urn:sha1:ace30ba813ed723534c3b4d223db6eddea417de7</id>
<content type='text'>
Instead of printing the help menu, this will print "No next hunk" and then
process the given hunk again.

Signed-off-by: William Pursell &lt;bill.pursell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add / command in add --patch</title>
<updated>2009-02-02T03:43:38Z</updated>
<author>
<name>William Pursell</name>
<email>bill.pursell@gmail.com</email>
</author>
<published>2008-11-27T04:07:57Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=dd971cc9d6588307447075b2352127a9e24dd3e1'/>
<id>urn:sha1:dd971cc9d6588307447075b2352127a9e24dd3e1</id>
<content type='text'>
This command allows the user to skip hunks that don't match the specified
regex.

Signed-off-by: William Pursell &lt;bill.pursell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-add -i/-p: Change prompt separater from slash to comma</title>
<updated>2009-02-02T03:43:37Z</updated>
<author>
<name>William Pursell</name>
<email>bill.pursell@gmail.com</email>
</author>
<published>2008-11-27T04:07:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=57886bc7fb9413becf4c240320d61bf641600762'/>
<id>urn:sha1:57886bc7fb9413becf4c240320d61bf641600762</id>
<content type='text'>
Otherwise the find command '/' soon to be introduced will be hard to see.

Signed-off-by: William Pursell &lt;bill.pursell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add 'g' command to go to a hunk</title>
<updated>2008-12-05T01:59:45Z</updated>
<author>
<name>William Pursell</name>
<email>bill.pursell@gmail.com</email>
</author>
<published>2008-12-04T10:22:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=070434d02b96ae0fac0a3364c202136f5eb5a7a9'/>
<id>urn:sha1:070434d02b96ae0fac0a3364c202136f5eb5a7a9</id>
<content type='text'>
When a minor change is made while the working directory is in a bit of a
mess, it is somewhat difficult to wade through all of the hunks using git
add --patch.  This allows one to jump to the hunk that needs to be staged
without having to respond 'n' to each preceding hunk.

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