<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-am.sh, branch v2.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.5.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-07-24T17:55:24Z</updated>
<entry>
<title>Revert "git-am: add am.threeWay config variable"</title>
<updated>2015-07-24T17:55:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-07-24T17:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15dc5b5fb049bdf7abdbc610a5dec040c4d499bd'/>
<id>urn:sha1:15dc5b5fb049bdf7abdbc610a5dec040c4d499bd</id>
<content type='text'>
This reverts commit d96a275b91bae1800cd43be0651e886e7e042a17.

It used to be possible to apply a patch series with "git am mbox"
and then only after seeing a failure, switch to three-way mode via
"git am -3" (no other options or arguments).  The commit being
reverted broke this workflow.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pt/am-abort-fix'</title>
<updated>2015-06-24T19:21:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-24T19:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce5e33832ae3f7224fe39d6ade4764522197bacf'/>
<id>urn:sha1:ce5e33832ae3f7224fe39d6ade4764522197bacf</id>
<content type='text'>
Various fixes around "git am" that applies a patch to a history
that is not there yet.

* pt/am-abort-fix:
  am --abort: keep unrelated commits on unborn branch
  am --abort: support aborting to unborn branch
  am --abort: revert changes introduced by failed 3way merge
  am --skip: support skipping while on unborn branch
  am -3: support 3way merge on unborn branch
  am --skip: revert changes introduced by failed 3way merge
</content>
</entry>
<entry>
<title>Merge branch 'rl/am-3way-config'</title>
<updated>2015-06-24T19:21:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-24T19:21:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b64c8a1eea6b44fb8505ec46cccf8255c7e6c63'/>
<id>urn:sha1:4b64c8a1eea6b44fb8505ec46cccf8255c7e6c63</id>
<content type='text'>
"git am" learned am.threeWay configuration variable.

* rl/am-3way-config:
  git-am: add am.threeWay config variable
  t4150-am: refactor am -3 tests
  git-am.sh: fix initialization of the threeway variable
</content>
</entry>
<entry>
<title>am --abort: keep unrelated commits on unborn branch</title>
<updated>2015-06-08T20:14:04Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6ea3b67b4e3f4a09561a26ca42af1492b3b48c95'/>
<id>urn:sha1:6ea3b67b4e3f4a09561a26ca42af1492b3b48c95</id>
<content type='text'>
Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure
and warn, 2010-12-21), git-am would refuse to rewind HEAD if commits
were made since the last git-am failure. This check was implemented in
safe_to_abort(), which checked to see if HEAD's hash matched the
abort-safety file.

However, this check was skipped if the abort-safety file was empty,
which can happen if git-am failed while on an unborn branch. As such, if
any commits were made since then, they would be discarded. Fix this by
carrying on the abort safety check even if the abort-safety file is
empty.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am --abort: support aborting to unborn branch</title>
<updated>2015-06-08T20:10:45Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e06764c8ebf87a80737dc0a6198a013799f18e32'/>
<id>urn:sha1:e06764c8ebf87a80737dc0a6198a013799f18e32</id>
<content type='text'>
When git-am is first run on an unborn branch, no ORIG_HEAD is created.
As such, any applied commits will remain even after a git am --abort.

To be consistent with the behavior of git am --abort when it is not run
from an unborn branch, we empty the index, and then destroy the branch
pointed to by HEAD if there is no ORIG_HEAD.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am --abort: revert changes introduced by failed 3way merge</title>
<updated>2015-06-08T20:09:20Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=20c3fe762105a29150fd21e3e0a340bca7890848'/>
<id>urn:sha1:20c3fe762105a29150fd21e3e0a340bca7890848</id>
<content type='text'>
Even when a merge conflict occurs with am --3way, the index will be
modified with the results of any successfully merged files. These
changes to the index will not be reverted with a
"git read-tree --reset -u HEAD ORIG_HEAD", as git read-tree will not be
aware of how the current index differs from HEAD or ORIG_HEAD.

To fix this, we first reset any conflicting entries in the index. The
resulting index will contain the results of successfully merged files
introduced by the failed merge. We write this index to a tree, and then
use git read-tree to fast-forward this "index tree" back to ORIG_HEAD,
thus undoing all the changes from the failed merge.

When we are on an unborn branch, HEAD and ORIG_HEAD will not point to
valid trees. In this case, use an empty tree.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am --skip: support skipping while on unborn branch</title>
<updated>2015-06-08T20:06:44Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8da6801e2fb3e46a42031b860c6411ef76a0335'/>
<id>urn:sha1:f8da6801e2fb3e46a42031b860c6411ef76a0335</id>
<content type='text'>
When git am --skip is run, git am will copy HEAD's tree entries to the
index with "git reset HEAD". However, on an unborn branch, HEAD does not
point to a tree, so "git reset HEAD" will fail.

Fix this by treating HEAD as en empty tree when we are on an unborn
branch.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am -3: support 3way merge on unborn branch</title>
<updated>2015-06-08T20:06:09Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c970c9ec3af9e162951a1b22d42c1a4dd9a8fed'/>
<id>urn:sha1:2c970c9ec3af9e162951a1b22d42c1a4dd9a8fed</id>
<content type='text'>
While on an unborn branch, git am -3 will fail to do a threeway merge as
it references HEAD as "our tree", but HEAD does not point to a valid
tree.

Fix this by using an empty tree as "our tree" when we are on an unborn
branch.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am --skip: revert changes introduced by failed 3way merge</title>
<updated>2015-06-08T20:05:43Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-06T11:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88d5072466de2e0ba256a283eaaa6a79e31735a5'/>
<id>urn:sha1:88d5072466de2e0ba256a283eaaa6a79e31735a5</id>
<content type='text'>
Even when a merge conflict occurs with am --3way, the index will be
modified with the results of any succesfully merged files (such as a new
file). These changes to the index will not be reverted with a
"git read-tree --reset -u HEAD HEAD", as git read-tree will not be aware
of how the current index differs from HEAD.

To fix this, we first reset any conflicting entries from the index. The
resulting index will contain the results of successfully merged files.
We write the index to a tree, then use git read-tree -m to fast-forward
the "index tree" back to HEAD, thus undoing all the changes from the
failed merge.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-am: add am.threeWay config variable</title>
<updated>2015-06-04T17:42:41Z</updated>
<author>
<name>Remi Lespinet</name>
<email>remi.lespinet@ensimag.grenoble-inp.fr</email>
</author>
<published>2015-06-04T15:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d96a275b91bae1800cd43be0651e886e7e042a17'/>
<id>urn:sha1:d96a275b91bae1800cd43be0651e886e7e042a17</id>
<content type='text'>
Add the am.threeWay configuration variable to use the -3 or --3way
option of git am by default. When am.threeway is set and not desired
for a specific git am command, the --no-3way option can be used to
override it.

Signed-off-by: Remi Lespinet &lt;remi.lespinet@ensimag.grenoble-inp.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
