Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk headers (AKA recountdiff)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> Then I understood you not correctly at all when you complained about the 
> "Probably a diff" part.

The wish was this.

When recounting this hunk:

	@@ -l,m +n,o @@$
         preimage$
        -deleted$
        -deleted$
        Some other text

I want you to say "three and one", and not error out.  Reading "Some other
text" and deciding that the stream of fragments for the current patch has
ended is the job for parse_single_patch().

If on the other hand the input were:

	@@ -l,m +n,o @@$
         preimage$
        -deleted$
        -deleted$
	-- $
        This space intentionally left blank.
	perhaps a few more lines of sig
	<<EOF>>

I do not want you to say "four and one" silently.  It is more likely that
the answer is "three and one", and the last line that begins with a '-' is
not part of the diff, but for the sake of robustness, I do not want to
hear "three and one" without warning either.  Erroring out, because you
cannot recount reliably, would be prudent.  We do not have a clever tool
that sometimes does a wrong thing silently.

I was fooled by the "where does the line begin when we come to this
function", so I need to re-read the code and see what you are doing.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux