Re: [PATCH] git-am: indicate where a failed patch is to be found.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 12, 2012, 18:53 UTC
- Message-ID
- <7va9z4byl3.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FFF1821.7030705@windriver.com>
Paul Gortmaker <paul.gortmaker@windriver.com> writes:
Show 18 quoted lines
> On 12-07-12 01:45 PM, Junio C Hamano wrote: >> Paul Gortmaker <paul.gortmaker@windriver.com> writes: >> >>> If git am wasn't run with --reject, we assume the end user >>> knows where to find the patch. This is normally true for >>> a single patch, >> >> Not at all. Whether it is a single or broken, the patch is fed to >> underlying "apply" from an unadvertised place. > > What I meant by this was the difference between: > > git am 0001-some-standalone-single.patch > vs. > git am mbox > > In the 1st, the standalone patch is 100% clear and easy to access, > because we really don't need/care about the unadvertised place.
It does not matter at all that 0001-foo.patch only has a single patch. If you are going to fix up the patch after you saw "git am" failed, you will be fixing .git/rebase-apply/patch with your editor and re-run "git am" without arguments, at which point "git am" will not look at your 0001-foo.patch file at all.
Show 6 quoted lines
>> This is _NOT_ fine, especially if you suggest "patch" the user may
>> not have, and more importantly does not have a clue why "git apply"
>> rejected it ("am" does _not_ use "patch" at all).
>
> I'm not 100% sure I'm following what part here is not OK. If you
> can help me understand that, I'll respin the change accordingly.Do not ever mention "patch -p1". It is not the command that "git am" uses, and it is not what detected the breakage in the patch.
The command to guide the user to is "git apply".