<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-rebase--interactive.sh, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-07-06T20:06:41Z</updated>
<entry>
<title>Merge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint</title>
<updated>2016-07-06T20:06:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-06T20:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=af3a43cb111bc3136389a9f1285fbccb97f42205'/>
<id>urn:sha1:af3a43cb111bc3136389a9f1285fbccb97f42205</id>
<content type='text'>
Comments about misbehaving FreeBSD shells have been clarified with
the version number (9.x and before are broken, newer ones are OK).

* em/newer-freebsd-shells-are-fine-with-returns:
  rebase: update comment about FreeBSD /bin/sh
</content>
</entry>
<entry>
<title>rebase: update comment about FreeBSD /bin/sh</title>
<updated>2016-06-17T18:04:38Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@freebsd.org</email>
</author>
<published>2016-06-17T15:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b35cadc2c7660745264041317f5982e1dde3f88'/>
<id>urn:sha1:9b35cadc2c7660745264041317f5982e1dde3f88</id>
<content type='text'>
Commit 9f50d32 introduced a fix for FreeBSD /bin/sh misbehaviour
when dot-sourcing a file containing "return" statements outside of
any function, from a function in another shell script. That issue
affects FreeBSD 9.x, and is not present in the /bin/sh in FreeBSD
10.3 and later. Update the comment to clarify this.

The example from 9f50d32's commit message produces the expected output
on FreeBSD 10.3 and -CURRENT (the upcoming 11.0):

% sh script1.sh
only this line should show
%

Signed-off-by: Ed Maste &lt;emaste@freebsd.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/rebase-i-dedup-call-to-rerere'</title>
<updated>2016-06-03T21:38:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-03T21:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7267404dc5a84e7a4c81a55eb3bf22e14bcc7d1c'/>
<id>urn:sha1:7267404dc5a84e7a4c81a55eb3bf22e14bcc7d1c</id>
<content type='text'>
"git rebase -i", after it fails to auto-resolve the conflict, had
an unnecessary call to "git rerere" from its very early days, which
was spotted recently; the call has been removed.

* js/rebase-i-dedup-call-to-rerere:
  rebase -i: remove an unnecessary 'rerere' invocation
</content>
</entry>
<entry>
<title>rebase -i: remove an unnecessary 'rerere' invocation</title>
<updated>2016-05-31T20:47:18Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2016-05-27T16:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7063693d51778815cfb9a4bc1e4e6d16f13589e7'/>
<id>urn:sha1:7063693d51778815cfb9a4bc1e4e6d16f13589e7</id>
<content type='text'>
Interactive rebase uses 'git cherry-pick' and 'git merge' to replay
commits. Both invoke the 'rerere' machinery when they fail due to merge
conflicts. Note that all code paths with these two commands also invoke
the shell function die_with_patch when the commands fail.

Since commit 629716d2 ("rerere: do use multiple variants") the second
operation of the rerere machinery can be observed by a duplicated
message "Recorded preimage for 'file'". This second operation records
the same preimage as the first one and, hence, only wastes cycles.
Remove the 'git rerere' invocation from die_with_patch.

Shell function die_with_patch can be called after the failure of
"git commit", too, which also calls into the rerere machinery, but it
does so only after a successful commit to record the resolution.
Therefore, it is wrong to call 'git rerere' from die_with_patch after
"git commit" fails.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/test-z-n-unquoted'</title>
<updated>2016-05-23T21:54:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-23T21:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dca05bb5913026fb64f6392675e7ab3ff643dcec'/>
<id>urn:sha1:dca05bb5913026fb64f6392675e7ab3ff643dcec</id>
<content type='text'>
t9xxx series has been updated primarily for readability, while
fixing small bugs in it.  A few scripted Porcelains have also been
updated to fix possible bugs around their use of "test -z" and
"test -n".

* jk/test-z-n-unquoted:
  always quote shell arguments to test -z/-n
  t9103: modernize test style
  t9107: switch inverted single/double quotes in test
  t9107: use "return 1" instead of "exit 1"
  t9100,t3419: enclose all test code in single-quotes
  t/lib-git-svn: drop $remote_git_svn and $git_svn_id
</content>
</entry>
<entry>
<title>Merge branch 'jk/rebase-interative-eval-fix'</title>
<updated>2016-05-17T21:38:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd704b16f14a43f7d6688f0059cf9ddf9b1d9b2f'/>
<id>urn:sha1:fd704b16f14a43f7d6688f0059cf9ddf9b1d9b2f</id>
<content type='text'>
Portability enhancement for "rebase -i" to help platforms whose
shell does not like "for i in &lt;empty&gt;" (which is not POSIX-kosher).

* jk/rebase-interative-eval-fix:
  rebase--interactive: avoid empty list in shell for-loop
</content>
</entry>
<entry>
<title>always quote shell arguments to test -z/-n</title>
<updated>2016-05-14T17:37:29Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-05-13T20:47:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=268ef4d3d07e4cf9909ac060b63b195509391190'/>
<id>urn:sha1:268ef4d3d07e4cf9909ac060b63b195509391190</id>
<content type='text'>
In shell code like:

  test -z $foo
  test -n $foo

that does not quote its arguments, it's easy to think that
it is actually looking at the contents of $foo in each case.
But if $foo is empty, then "test" does not see any argument
at all! The results are quite subtle.

POSIX specifies that test's behavior depends on the number
of arguments it sees, and if $foo is empty, it sees only
one. The behavior in this case is:

  1 argument: Exit true (0) if $1 is not null; otherwise,
              exit false.

So in the "-z $foo" case, if $foo is empty, then we check
that "-z" is non-null, and it returns success. Which happens
to match what we expected.  But for "-n $foo", if $foo is
empty, we'll see that "-n" is non-null and still return
success. That's the opposite of what we intended!

Furthermore, if $foo contains whitespace, we'll end up with
more than 2 arguments. The results in this case are
generally unspecified (unless the first part of $foo happens
to be a valid binary operator, in which case the results are
specified but certainly not what we intended).

And on top of this, even though "test -z $foo" _should_ work
for the empty case, some older shells (reportedly ksh88)
complain about the missing argument.

So let's make sure we consistently quote our variable
arguments to "test". After this patch, the results of:

  git grep 'test -[zn] [^"]'

are empty.

Reported-by: Armin Kunaschik &lt;megabreit@googlemail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
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>rebase--interactive: avoid empty list in shell for-loop</title>
<updated>2016-05-10T21:11:27Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-05-10T21:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e98b35f87532761f09101729715c2ec49e24ddf'/>
<id>urn:sha1:8e98b35f87532761f09101729715c2ec49e24ddf</id>
<content type='text'>
The $strategy_opts variable contains a space-separated list
of strategy options, each individually shell-quoted. To loop
over each, we "unwrap" them by doing an eval like:

  eval '
    for opt in '"$strategy_opts"'
    do
       ...
    done
  '

Note the quoting that means we expand $strategy_opts inline
in the code to be evaluated (which is the right thing
because we want the IFS-split and de-quoting). If the
variable is empty, however, we ask the shell to eval the
following code:

  for opt in
  do
     ...
  done

without anything between "in" and "do".  Most modern shells
are happy to treat that like a noop, but reportedly ksh88 on
AIX considers it a syntax error. So let's catch the case
that the variable is empty and skip the eval altogether
(since we know the loop would be a noop anyway).

Reported-by: Armin Kunaschik &lt;megabreit@googlemail.com&gt;
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 'rt/rebase-i-shorten-stop-report'</title>
<updated>2016-04-13T21:12:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-13T21:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c788e7746a2b60e13a0e9235bb68a19a35c12ee'/>
<id>urn:sha1:5c788e7746a2b60e13a0e9235bb68a19a35c12ee</id>
<content type='text'>
The commit object name reported when "rebase -i" stops has been
shortened.

* rt/rebase-i-shorten-stop-report:
  rebase-i: print an abbreviated hash when stop for editing
</content>
</entry>
<entry>
<title>rebase-i: print an abbreviated hash when stop for editing</title>
<updated>2016-03-28T17:49:40Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2016-03-28T16:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14c793e8f409216b868223236fc54e5e5f86aa3a'/>
<id>urn:sha1:14c793e8f409216b868223236fc54e5e5f86aa3a</id>
<content type='text'>
The message that is shown when rebase-i stops for editing prints
the full hash of the commit where it stopped which makes the message
overflow to the next line on smaller terminal windows.  Print an
abbreviated hash instead.

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