From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Robert Fitzsimons <robfitz@273k.net>
Subject: Re: [PATCHv1bis 1/2] git apply: option to ignore whitespace differences
Date: Thu, 2 Jul 2009 22:33:10 +0200 [thread overview]
Message-ID: <cb7bb73a0907021333t6f377d61v1c1479c15b72c436@mail.gmail.com> (raw)
In-Reply-To: <7vhbxu6f87.fsf@alter.siamese.dyndns.org>
On Thu, Jul 2, 2009 at 9:45 PM, Junio C Hamano<gitster@pobox.com> wrote:
> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
>
>> 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."
Perfectly agreed. I'm not asking you to apply the patches as they are,
I sent them to the list for review, and CC'ed you since I couldn't
identify a git-apply maintainer.
> 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.
As you yourself pointed out in the previous email, when ignoring
whitespace the code wouldn't hit the whitespace fix path at all.
Indeed, I've updated the patch to this effect right after reading your
previous email.
> 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.
That's totally not what I meant. The other way around though, i.e. a preimage of
"this has extra whitespace \n"
should match against
"this has extra whitespace\nand other stuff\n"
And of course
"this has extra whitespace \n"
should fail against
"this has extra whitespace and other stuff\n"
Both cases behave correctly (I just extended the test to include this case, btw)
A more interesting question would be if a missing EOL at EOF should be
treated as whitespace difference or not.
> 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.
Oh, thanks, when first adapting Robert's patch I hadn't considered it
missed this case. I've updated the patch accordingly and added a test
case for it.
> 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).
I do wonder what makes the patch 'unreviewable', since I assume that
doesn't mean just 'does not include the refactoring I requested'.
> Please do not Cc me in the meantime, but please do ask for help from other
> people interested in this topic on the list.
I thought it appropriate to cc you for this specific reply since I was
addressing the doubts you raised, but I will not include you in the
next resend of the series, as per your request. Thanks for your
patience anyway.
--
Giuseppe "Oblomov" Bilotta
next prev parent reply other threads:[~2009-07-02 20:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 17:48 [PATCHv1bis 0/2] git apply: cope with whitespace differences Giuseppe Bilotta
2009-07-02 17:48 ` [PATCHv1bis 1/2] git apply: option to ignore " Giuseppe Bilotta
2009-07-02 17:48 ` [PATCHv1bis 2/2] git apply: preserve original whitespace with --ignore-whitespace Giuseppe Bilotta
2009-07-02 18:27 ` [PATCHv1bis 1/2] git apply: option to ignore whitespace differences Junio C Hamano
2009-07-02 19:02 ` Giuseppe Bilotta
2009-07-02 19:28 ` Giuseppe Bilotta
2009-07-02 19:45 ` Junio C Hamano
2009-07-02 20:33 ` Giuseppe Bilotta [this message]
2009-07-02 21:00 ` Junio C Hamano
2009-07-02 21:05 ` Giuseppe Bilotta
2009-07-02 23:55 ` Junio C Hamano
2009-07-03 6:40 ` Giuseppe Bilotta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb7bb73a0907021333t6f377d61v1c1479c15b72c436@mail.gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=robfitz@273k.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).