<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-rebase.sh, branch v2.4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.7</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-05-26T20:49:23Z</updated>
<entry>
<title>Merge branch 'jk/rebase-quiet-noop' into maint</title>
<updated>2015-05-26T20:49:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-26T20:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d5343386414d6097cdba797c88e3bc043dc0074'/>
<id>urn:sha1:5d5343386414d6097cdba797c88e3bc043dc0074</id>
<content type='text'>
"git rebase --quiet" was not quite quiet when there is nothing to
do.

* jk/rebase-quiet-noop:
  rebase: silence "git checkout" for noop rebase
</content>
</entry>
<entry>
<title>rebase: silence "git checkout" for noop rebase</title>
<updated>2015-04-28T18:38:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-04-28T05:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22946a942627d67b09a9630a036e48ce2823cd0c'/>
<id>urn:sha1:22946a942627d67b09a9630a036e48ce2823cd0c</id>
<content type='text'>
When the branch to be rebased is already up to date, we
"git checkout" the branch, print an "up to date" message,
and end the rebase early. However, our checkout may print
"Switched to branch 'foo'" or "Already on 'foo'", even if
the user has asked for "--quiet".

We should avoid printing these messages at all, "--quiet" or
no. Since the rebase is a noop, this checkout can be seen as
optimizing out these other two checkout operations (that
happen in a real rebase):

  1. Moving to the detached HEAD to start the rebase; we
     always feed "-q" to checkout there, and instead rely on
     our own custom message (which respects --quiet).

  2. Finishing a rebase, where we move to the final branch.
     Here we actually use update-ref rather than
     git-checkout, and produce no messages.

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: omit patch-identical commits with --fork-point</title>
<updated>2014-07-16T20:07:40Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-07-16T19:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e0dacdbdb751caa5936b6d1510f5e8db4d1ed5f'/>
<id>urn:sha1:1e0dacdbdb751caa5936b6d1510f5e8db4d1ed5f</id>
<content type='text'>
When the `--fork-point` argument was added to `git rebase`, we changed
the value of $upstream to be the fork point instead of the point from
which we want to rebase.  When $orig_head..$upstream is empty this does
not change the behaviour, but when there are new changes in the upstream
we are no longer checking if any of them are patch-identical with
changes in $upstream..$orig_head.

Fix this by introducing a new variable to hold the fork point and using
this to restrict the range as an extra (negative) revision argument so
that the set of desired revisions becomes (in fork-point mode):

	git rev-list --cherry-pick --right-only \
		$upstream...$orig_head ^$fork_point

This allows us to correctly handle the scenario where we have the
following topology:

	    C --- D --- E  &lt;- dev
	   /
	  B  &lt;- master@{1}
	 /
	o --- B' --- C* --- D*  &lt;- master

where:
- B' is a fixed-up version of B that is not patch-identical with B;
- C* and D* are patch-identical to C and D respectively and conflict
  textually if applied in the wrong order;
- E depends textually on D.

The correct result of `git rebase master dev` is that B is identified as
the fork-point of dev and master, so that C, D, E are the commits that
need to be replayed onto master; but C and D are patch-identical with C*
and D* and so can be dropped, so that the end result is:

	o --- B' --- C* --- D* --- E  &lt;- dev

If the fork-point is not identified, then picking B onto a branch
containing B' results in a conflict and if the patch-identical commits
are not correctly identified then picking C onto a branch containing D
(or equivalently D*) results in a conflict.

This change allows us to handle both of these cases, where previously we
either identified the fork-point (with `--fork-point`) but not the
patch-identical commits *or* (with `--no-fork-point`) identified the
patch-identical commits but not the fact that master had been rewritten.

Reported-by: Ted Felix &lt;ted@tedfelix.com&gt;
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rr/rebase-autostash-fix' into maint</title>
<updated>2014-06-25T18:49:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-25T18:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9036cd28c9b115fe38e2f629292f2ddf60fb805'/>
<id>urn:sha1:d9036cd28c9b115fe38e2f629292f2ddf60fb805</id>
<content type='text'>
The autostash mode of "git rebase -i" did not restore the dirty
working tree state if the user aborted the interactive rebase by
emptying the insn sheet.

* rr/rebase-autostash-fix:
  rebase -i: test "Nothing to do" case with autostash
  rebase -i: handle "Nothing to do" case with autostash
</content>
</entry>
<entry>
<title>Merge branch 'rr/rebase-autostash-fix'</title>
<updated>2014-06-16T17:06:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T17:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4a43d4f98a1a6a472ce1e87c64cb6df0d1653d02'/>
<id>urn:sha1:4a43d4f98a1a6a472ce1e87c64cb6df0d1653d02</id>
<content type='text'>
* rr/rebase-autostash-fix:
  rebase -i: test "Nothing to do" case with autostash
  rebase -i: handle "Nothing to do" case with autostash
</content>
</entry>
<entry>
<title>Merge branch 'ep/shell-command-substitution'</title>
<updated>2014-06-03T19:06:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-03T19:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6753d8a85d543253d95184ec2faad6dc197f2486'/>
<id>urn:sha1:6753d8a85d543253d95184ec2faad6dc197f2486</id>
<content type='text'>
Adjust shell scripts to use $(cmd) instead of `cmd`.

* ep/shell-command-substitution: (41 commits)
  t5000-tar-tree.sh: use the $( ... ) construct for command substitution
  t4204-patch-id.sh: use the $( ... ) construct for command substitution
  t4119-apply-config.sh: use the $( ... ) construct for command substitution
  t4116-apply-reverse.sh: use the $( ... ) construct for command substitution
  t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution
  t4038-diff-combined.sh: use the $( ... ) construct for command substitution
  t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution
  t4014-format-patch.sh: use the $( ... ) construct for command substitution
  t4013-diff-various.sh: use the $( ... ) construct for command substitution
  t4012-diff-binary.sh: use the $( ... ) construct for command substitution
  t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution
  t4006-diff-mode.sh: use the $( ... ) construct for command substitution
  t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution
  t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution
  t1050-large.sh: use the $( ... ) construct for command substitution
  t1020-subdirectory.sh: use the $( ... ) construct for command substitution
  t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution
  t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution
  t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution
  t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution
  ...
</content>
</entry>
<entry>
<title>rebase -i: handle "Nothing to do" case with autostash</title>
<updated>2014-05-19T22:36:24Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2014-05-19T22:05:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4244eb3957d478ca05b42d8b56aadb9ab2bc7ae'/>
<id>urn:sha1:e4244eb3957d478ca05b42d8b56aadb9ab2bc7ae</id>
<content type='text'>
When a user invokes

  $ git rebase -i @~3

with dirty files and rebase.autostash turned on, and exits the $EDITOR
with an empty buffer, the autostash fails to apply. Although the primary
focus of rr/rebase-autostash was to get the git-rebase--backend.sh
scripts to return control to git-rebase.sh, it missed this case in
git-rebase--interactive.sh. Since this case is unlike the other cases
which return control for housekeeping, assign it a special return status
and handle that return value explicitly in git-rebase.sh.

Reported-by: Karen Etheridge &lt;ether@cpan.org&gt;
Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-rebase.sh: use the $( ... ) construct for command substitution</title>
<updated>2014-04-23T22:17:02Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-04-23T13:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=728fc79c0016fd7133c32f1d193d0a243e552257'/>
<id>urn:sha1:728fc79c0016fd7133c32f1d193d0a243e552257</id>
<content type='text'>
The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

and then carefully proof-read.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'km/avoid-non-function-return-in-rebase'</title>
<updated>2014-04-21T17:42:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-21T17:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b17b4331087224883878e49342037bf69717b62'/>
<id>urn:sha1:0b17b4331087224883878e49342037bf69717b62</id>
<content type='text'>
Work around /bin/sh that does not like "return" at the top-level
of a file that is dot-sourced from inside a function definition.

* km/avoid-non-function-return-in-rebase:
  Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
  rebase: avoid non-function use of "return" on FreeBSD
</content>
</entry>
<entry>
<title>Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"</title>
<updated>2014-04-17T17:15:27Z</updated>
<author>
<name>Kyle J. McKay</name>
<email>mackyle@gmail.com</email>
</author>
<published>2014-04-11T08:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cd65967fe0084574fcee278a5f9ff3d14047c4f'/>
<id>urn:sha1:8cd65967fe0084574fcee278a5f9ff3d14047c4f</id>
<content type='text'>
This reverts commit 99855ddf4bd319cd06a0524e755ab1c1b7d39f3b.

The workaround 99855ddf introduced to deal with problematic
"return" statements in scripts run by "dot" commands located
inside functions only handles one part of the problem.  The
issue has now been addressed by not using "return" statements
in this way in the git-rebase--*.sh scripts.

This workaround is therefore no longer necessary, so clean
up the code by reverting it.

Signed-off-by: Kyle J. McKay &lt;mackyle@gmail.com&gt;
Acked-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
