Re: [PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches

2015-07-01 Thread Paul Tan
On Tue, Jun 30, 2015 at 4:32 AM, Stefan Beller wrote: > On Mon, Jun 29, 2015 at 1:32 PM, Stefan Beller wrote: >> On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan wrote: >>> + tz = tz / (60 * 60) * 100 + tz % (60 * 60); >> >> What happens if we have a negative input not matching a

Re: [PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches

2015-07-01 Thread Paul Tan
On Tue, Jun 30, 2015 at 4:32 AM, Stefan Beller wrote: > for calculating the minutes we would only need to take % 3600 (which > you do), but > then we still need to divide by 60 to convert seconds to minutes? Whoops, yes we do. It should be: tz = tz / 3600 * 100 + tz % 3600 / 60; tz = -tz; Howev

Re: [PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches

2015-06-29 Thread Stefan Beller
On Mon, Jun 29, 2015 at 1:32 PM, Stefan Beller wrote: > On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan wrote: >> + tz = tz / (60 * 60) * 100 + tz % (60 * 60); > > What happens if we have a negative input not matching a full hour, say -5400 ? > (would equate to 0130 in git) > > fo

Re: [PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches

2015-06-29 Thread Stefan Beller
On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan wrote: > Since 0cfd112 (am: preliminary support for hg patches, 2011-08-29), > git-am.sh could convert mercurial patches to an RFC2822 mail patch > suitable for parsing with git-mailinfo, and queue them in the state > directory for application. > > Since 1

[PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches

2015-06-28 Thread Paul Tan
Since 0cfd112 (am: preliminary support for hg patches, 2011-08-29), git-am.sh could convert mercurial patches to an RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state directory for application. Since 15ced75 (git-am foreign patch support: autodetect some patch f