All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: git-apply{,mbox,patch} should default to --unidiff-zero
Date: Fri, 6 Jul 2007 04:26:29 +0200	[thread overview]
Message-ID: <20070706022629.GL3492@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0707060243110.4093@racer.site>

On Fri, Jul 06, 2007 at 02:51:07AM +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 6 Jul 2007, Adrian Bunk wrote:
> 
> > On Fri, Jul 06, 2007 at 02:18:46AM +0100, Johannes Schindelin wrote:
> > 
> > > On Fri, 6 Jul 2007, Adrian Bunk wrote:
> > > 
> > > > git-apply{,mbox,patch} should default to doing --unidiff-zero:
> > > 
> > > But is that not dangerous? At least now the committer has some 
> > > safeguard against this kind of mistakes. Because you can easily 
> > > introduce mistakes that way.
> > 
> > you are saying "easily".
> > 
> > Did you ever actually run into such a problem?
> 
> Not yet, thankfully.
> 
> > You must do something like "diff -U0" or manually editing patches for 
> > creating such patches, and that's very unusual.
> 
> The point is that the _committer_ is not necessarily involved in that 
> business.
> 
> And "git apply" is strict for a reason. It catches possibly unwanted 
> things much earlier than patch. I _want_ to be warned that somebody is 
> introducing some code at a certain position, which might, or might not be 
> correct. apply has no way to tell, since there is no context to at least 
> minimally verify.
>...

That's wrong.

My use cases are replacing or deleting lines.

In these cases there is context in the deleted lines that is already 
being verified even with --unidiff-zero.

> Ciao,
> Dscho

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

  reply	other threads:[~2007-07-06  2:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 23:22 git-apply{,mbox,patch} should default to --unidiff-zero Adrian Bunk
2007-07-06  1:18 ` Johannes Schindelin
2007-07-06  1:42   ` Adrian Bunk
2007-07-06  1:51     ` Johannes Schindelin
2007-07-06  2:26       ` Adrian Bunk [this message]
2007-07-06  3:16         ` Johannes Schindelin
2007-07-06  4:12           ` Linus Torvalds
2007-07-06  5:41             ` Junio C Hamano
2007-07-06 12:14               ` Adrian Bunk
2007-07-06 12:49                 ` Johannes Schindelin

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=20070706022629.GL3492@stusta.de \
    --to=bunk@stusta.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.