<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-am.sh, branch v2.7.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-08-05T05:02:11Z</updated>
<entry>
<title>builtin-am: remove redirection to git-am.sh</title>
<updated>2015-08-05T05:02:11Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-08-04T13:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=783d7e865ec8f6190f8d3abe3ab72a9410d611f1'/>
<id>urn:sha1:783d7e865ec8f6190f8d3abe3ab72a9410d611f1</id>
<content type='text'>
At the beginning of the rewrite of git-am.sh to C, in order to not break
existing test scripts that depended on a functional git-am, a
redirection to git-am.sh was introduced that would activate if the
environment variable _GIT_USE_BUILTIN_AM was not defined.

Now that all of git-am.sh's functionality has been re-implemented in
builtin/am.c, remove this redirection, and retire git-am.sh into
contrib/examples/.

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>Merge branch 'pt/am-foreign'</title>
<updated>2015-08-03T18:01:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7cf4b257179b4683fa32beb51f949666d36fe9c'/>
<id>urn:sha1:e7cf4b257179b4683fa32beb51f949666d36fe9c</id>
<content type='text'>
Various enhancements around "git am" reading patches generated by
foreign SCM.

* pt/am-foreign:
  am: teach mercurial patch parser how to read from stdin
  am: use gmtime() to parse mercurial patch date
  t4150: test applying StGit series
  am: teach StGit patch parser how to read from stdin
  t4150: test applying StGit patch
</content>
</entry>
<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: teach mercurial patch parser how to read from stdin</title>
<updated>2015-06-15T19:34:31Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-15T11:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f0aa6e65447c719abe8fe739d9f1e40b7335af8'/>
<id>urn:sha1:9f0aa6e65447c719abe8fe739d9f1e40b7335af8</id>
<content type='text'>
git-mailsplit, which splits mbox patches, will read the patch from stdin
when the filename is "-" or there are no files listed on the
command-line.

To be consistent with this behavior, teach the mercurial patch parser to
read from stdin if the filename is "-" or no files are listed on the
command-line.

Based-on-patch-by: Chris Packham &lt;judge.packham@gmail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
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: use gmtime() to parse mercurial patch date</title>
<updated>2015-06-15T19:34:11Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-15T11:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9dfe253fd489ea171e0478147aeb6eab91dab75'/>
<id>urn:sha1:e9dfe253fd489ea171e0478147aeb6eab91dab75</id>
<content type='text'>
An example of the line in a mercurial patch that specifies the date of
the commit would be:

	# Date 1433753301 25200

where the first number is the number of seconds since the unix epoch (in
UTC), and the second number is the offset of the timezone, in second s
west of UTC (negative if the timezone is east of UTC).

git-am uses localtime() to break down the first number into its
components (year, month, day, hours, minutes, seconds etc.). However,
the returned components are relative to the user's time zone. As a
result, if the user's time zone does not match the time zone specified
in the patch, the resulting commit will have the wrong author date.

Fix this by using gmtime() instead, which uses UTC instead of the user's
time zone.

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: teach StGit patch parser how to read from stdin</title>
<updated>2015-06-15T19:33:24Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-15T11:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab680dce2b565d285ac538fc931bd4b93beb68c8'/>
<id>urn:sha1:ab680dce2b565d285ac538fc931bd4b93beb68c8</id>
<content type='text'>
git-mailsplit, which splits mbox patches, will read the patch from stdin
when the filename is "-" or there are no files listed on the
command-line.

To be consistent with this behavior, teach the StGit patch parser to
read from stdin if the filename is "-" or no files are listed on the
command-line.

Based-on-patch-by: Chris Packham &lt;judge.packham@gmail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
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: 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>
</feed>
