git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv3] git apply: option to ignore whitespace differences
Date: Wed, 29 Jul 2009 11:05:40 +0200	[thread overview]
Message-ID: <cb7bb73a0907290205t6402c5dbob3d4a1663ec39135@mail.gmail.com> (raw)
In-Reply-To: <7vws5rx4qt.fsf@alter.siamese.dyndns.org>

On Wed, Jul 29, 2009 at 10:39 AM, Junio C Hamano<gitster@pobox.com> wrote:
> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
>
>> I was thinking more about consistency than 'correctness'  in this
>> case, actually. Typical scenario would be: patch is created for a file
>> using a given whitespace convention (e.g. 4 spaces). File is updated
>> to match the rest of the project (tabs). Patch would now introduce the
>> wrong whitespace convention for the new lines.
>
> You are assuming that the patch is always based on a wrong convention and
> the target always uses the right convention.

No, I'm just assuming that the lines should have consistent whitespace

> In general, however, you
> cannot tell which way the "consisitency" should go --- often you have to
> apply a patch based on a fixed codebase to an older version.

Consistency should go the way of the context lines. So if the
convention changed and you're backporting changes, the changes would
use the old convention on the old codebase, and the new convention on
the new codebase, because that's what the context lines would direct
the new lines to.

Of course, this is all very abstract reasoning because I don't even
think the feature can be implemented at all robustly (too much 'AI'
work, IMO).

-- 
Giuseppe "Oblomov" Bilotta

  reply	other threads:[~2009-07-29  9:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 21:00 [PATCHv3] git apply: option to ignore whitespace differences Giuseppe Bilotta
2009-07-28 21:29 ` Junio C Hamano
2009-07-29  6:33   ` Giuseppe Bilotta
2009-07-29  7:09     ` Junio C Hamano
2009-07-29  8:20       ` Giuseppe Bilotta
2009-07-29  8:39         ` Junio C Hamano
2009-07-29  9:05           ` Giuseppe Bilotta [this message]
2009-07-29  8:40     ` Nanako Shiraishi
2009-07-29  9:09       ` Giuseppe Bilotta
2009-07-31  0:27       ` Felipe Contreras
2009-07-31  0:48         ` Junio C Hamano
2009-07-31 15:38           ` Felipe Contreras
2009-07-31 16:16             ` Giuseppe Bilotta
2009-07-31 17:17               ` Junio C Hamano
2009-07-31 19:22                 ` 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=cb7bb73a0907290205t6402c5dbob3d4a1663ec39135@mail.gmail.com \
    --to=giuseppe.bilotta@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).