<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-am.sh, branch v2.4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.9</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-08-03T17:41:32Z</updated>
<entry>
<title>Merge branch 'pt/am-abort-fix' into maint</title>
<updated>2015-08-03T17:41:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T17:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c36e465aca712cea70cb9570a1e7136e5de36b76'/>
<id>urn:sha1:c36e465aca712cea70cb9570a1e7136e5de36b76</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>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 --message-id/--no-message-id</title>
<updated>2014-11-25T23:27:01Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2014-11-25T14:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a078f7321b02eb945b63804a80b0ba52c9da4ed3'/>
<id>urn:sha1:a078f7321b02eb945b63804a80b0ba52c9da4ed3</id>
<content type='text'>
Parse the option and pass it directly to git-mailinfo.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jl/nor-or-nand-and'</title>
<updated>2014-04-08T19:00:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-08T19:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d59c12d7ad39f942fc60578ba1e934822f40445b'/>
<id>urn:sha1:d59c12d7ad39f942fc60578ba1e934822f40445b</id>
<content type='text'>
Eradicate mistaken use of "nor" (that is, essentially "nor" used
not in "neither A nor B" ;-)) from in-code comments, command output
strings, and documentations.

* jl/nor-or-nand-and:
  code and test: fix misuses of "nor"
  comments: fix misuses of "nor"
  contrib: fix misuses of "nor"
  Documentation: fix misuses of "nor"
</content>
</entry>
<entry>
<title>comments: fix misuses of "nor"</title>
<updated>2014-03-31T22:29:27Z</updated>
<author>
<name>Justin Lebar</name>
<email>jlebar@google.com</email>
</author>
<published>2014-03-31T22:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01689909eb9f8366583c44b325d8d9ba259a2538'/>
<id>urn:sha1:01689909eb9f8366583c44b325d8d9ba259a2538</id>
<content type='text'>
Signed-off-by: Justin Lebar &lt;jlebar@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
