git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Gustavsson" <bgustavsson@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 2/4] apply: Allow blank context lines to match beyond  EOF
Date: Thu, 25 Feb 2010 00:02:52 +0100	[thread overview]
Message-ID: <6672d0161002241502h2f80b511j445465fdc2fd16ab@mail.gmail.com> (raw)
In-Reply-To: <7vaauyfj3k.fsf@alter.siamese.dyndns.org>

2010/2/24 Junio C Hamano <gitster@pobox.com>:
> Very nicely done.

Thanks! :)

> On the other hand "limit" does not have such a good definition, other than
> as a work around to bypass line-number check when we are trying to match
> at the end.  It might be cleaner to read if we move the problematic "line
> numbers must match" logic and eliminate this variable, like the attached
> patch does on top of this one.

Yes, your version is better. Having a "limit" variable no longer makes
sense (my original patch used "limit" in two places). Feel free to
squeeze it in.

> I couldn't figure out how this would interact with the ignore_ws_change
> codepath, though.  That one shows a clear sign of being bolted on as an
> afterthought (once you fall into that "if()" statement you will not come
> back).

Yes, it does seem bolted on.

I haven't looked much at that if() statement, because I
sort of assumed that because of the return it couldn't do any
harm.

It is too late in my time zone for me to think clearly, but it does
seem that I was wrong and that I'll need to do some changes in
that "if()" statement, and also write some more tests for
the combination of --whitespace=fix and --ignore-space-change.

I'll be back another day.

Thanks for the review.

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

      reply	other threads:[~2010-02-24 23:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 19:24 [PATCH v2 2/4] apply: Allow blank context lines to match beyond EOF Björn Gustavsson
2010-02-24 20:56 ` Junio C Hamano
2010-02-24 23:02   ` Björn Gustavsson [this message]

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=6672d0161002241502h2f80b511j445465fdc2fd16ab@mail.gmail.com \
    --to=bgustavsson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).