git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Miseler <alexander@miseler.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git-am silently applying patches incorrectly
Date: Sat, 05 Mar 2011 00:09:10 +0100	[thread overview]
Message-ID: <4D717116.3050305@miseler.de> (raw)
In-Reply-To: <7vtyfi606a.fsf@alter.siamese.dyndns.org>

On 04.03.2011 22:33, Junio C Hamano wrote:
> (Please don't cull Cc line).

Sorry. I used the nice gmane web interface and hoped that it keeps the CC intact, which it apparently doesn't. I guess i 
will go old school now and use the mailing list via actual emails :)


> Try implementing that warning logic, and using it in real-life projects.
> You don't actually have to _code_ it, but merely imagining how it would
> work and perform would be sufficient for you to realize that it would be
> quite expensive (you need to find all the possible mismatches, essentially
> scanning the whole file), and worse yet, it would be annoyingly noisy with
> many false positives, because in many real-life projects, end of function
> tends to match the problematic pattern that triggered this discussion
> quite often even without patches that introduce more of the pattern.
>
> Unless you can reduce the false hits to manageable levels, such a warning
> is not very useful (it would be useful as a lame excuse "we warned, but
> you took the suspicious result", but that does not help the users).
>
> In short, Linus and I both know what you are talking about, and we may
> revisit that issue later, but the thing is that it would not be very
> pleasant, and not something that can be done in one sitting during a
> single discussion thread on the list.

Understood. On a side note: if this problem is tackled it might be sensible to add a heuristic to git format-patch that 
increases the context size for hunks that are likely to be ambiguous. "Likely to be ambiguous" is of course a problem in 
itself but even a less than perfect detection might be helpful and it would suffer less from some of the aforementioned 
problems, like noisiness/false hits, which would just increase the patch size instead of harassing the user.

  parent reply	other threads:[~2011-03-04 23:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 13:40 [BUG] git-am silently applying patches incorrectly Colin Guthrie
2011-03-04 16:17 ` Drew Northup
2011-03-04 16:41   ` Colin Guthrie
2011-03-04 17:27     ` Junio C Hamano
2011-03-04 17:49 ` Junio C Hamano
2011-03-04 18:37   ` Junio C Hamano
2011-03-04 19:05     ` Junio C Hamano
2011-03-04 19:18       ` Linus Torvalds
2011-03-04 19:31         ` Junio C Hamano
2011-03-04 20:14           ` Alexander Miseler
2011-03-04 21:33             ` Junio C Hamano
2011-03-04 22:20               ` Colin Guthrie
2011-03-04 22:34                 ` Junio C Hamano
2011-03-04 22:42                 ` Junio C Hamano
2011-03-05 11:51                   ` Colin Guthrie
2011-03-06 22:15                     ` Junio C Hamano
2011-03-06 22:40                       ` Junio C Hamano
2011-03-06 22:56                         ` Jonathan Nieder
     [not found]                           ` <AANLkTikctSrfqKCdeYUyvUmAZjr=i7kaFhPeB-LfwgUz@mail.gmail.com>
2011-03-09 10:31                             ` [RFC/PATCH 0/2] i18n: add ngettext stub Jonathan Nieder
2011-03-09 10:46                               ` [PATCH 1/2] i18n: add stub ngettext implementation Jonathan Nieder
2011-03-09 10:52                               ` [PATCH 2/2] i18n: avoid conflict with ngettext from libintl Jonathan Nieder
2011-03-09 20:43                                 ` Junio C Hamano
2011-03-09 20:51                                   ` Jonathan Nieder
2011-03-09 20:55                                     ` Junio C Hamano
2011-03-10  3:17                                       ` [PATCH v2] i18n: add stub Q_() wrapper for ngettext Jonathan Nieder
2011-03-10  7:59                                         ` Junio C Hamano
2011-03-10  9:24                                           ` Ævar Arnfjörð Bjarmason
2011-03-10  9:21                                     ` [PATCH 2/2] i18n: avoid conflict with ngettext from libintl Ævar Arnfjörð Bjarmason
2011-03-06 22:15                     ` [BUG] git-am silently applying patches incorrectly Junio C Hamano
2011-03-07  9:37                       ` Colin Guthrie
2011-03-04 23:09               ` Alexander Miseler [this message]
2011-03-05  0:05                 ` Junio C Hamano
2011-03-04 22:58         ` Junio C Hamano
2011-03-04 21:49       ` Drew Northup

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=4D717116.3050305@miseler.de \
    --to=alexander@miseler.de \
    --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).