git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv1bis 1/2] git apply: option to ignore whitespace differences

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 2, 2009, 19:45 UTC
Message-ID
<7vhbxu6f87.fsf@alter.siamese.dyndns.org>
In-Reply-To
<cb7bb73a0907021228q7e9d2791vafead8e0c5b06b79@mail.gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
Show 5 quoted lines
> Sorry for repying to myself here, but I'm not convinced again. Or to
> be more specific: I think this kind of refactoring is totally out of
> the scope of this patch. So although I agree with you in priciple, if
> you don't mind I'll keep the first two patches simpler and less
> invasive. I'll look into the refactoring as a third step.

I am not interested in applying "this adds a broken ignore-whitespace option, but as long as you do not use it, it does not hurt the carefully crafted apply-with-context-whose-ws-breakage-was-fixed codepath." For example, I am not convinced at all that your patch does not break the update_pre_post_images() nor do I know what text the final pre/postimage will happen to end up with. In other words, I do not see a clear logic in the change.

Also about the broken "only prefix matches" loop, I do not understand why you would want to consider this preimage from the patch

	"this  has extra whitespace and other stuff\n"
matches the target line
	"this has extra whitespace\n"
only because the prefix matches.

For that matter, I do not think I understand why the leading whitespaces of s1 and s2 are skipped only when they both begin with a whitespace, either.

I do not want to be looking at this series until it gets into a bit more reviewable shape, which I would expect to take at least a week if you are not working on this full-time (and I presume nobody on the git list is).

Please do not Cc me in the meantime, but please do ask for help from other people interested in this topic on the list.

Previous: Giuseppe BilottaNext: Giuseppe Bilotta
Message 7 of 12 in “[PATCHv1bis 0/2] git apply: cope with whitespace differences”
  1. Giuseppe BilottaJul 2, 2009
  2. 1/2 git apply: option to ignore whitespace differencesGiuseppe Bilotta, Jul 2, 2009
  3. 2/2 git apply: preserve original whitespace with --ignore-whitespaceGiuseppe Bilotta, Jul 2, 2009
  4. Junio C HamanoJul 2, 2009
  5. Giuseppe BilottaJul 2, 2009
  6. Giuseppe BilottaJul 2, 2009
  7. Junio C HamanoJul 2, 2009
  8. Giuseppe BilottaJul 2, 2009
  9. Junio C HamanoJul 2, 2009
  10. Giuseppe BilottaJul 2, 2009
  11. Junio C HamanoJul 2, 2009
  12. Giuseppe BilottaJul 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.