Re: git-apply{,mbox,patch} should default to --unidiff-zero
From: Adrian Bunk <hidden>
Date: 2016-06-15 22:43:19
On Fri, Jul 06, 2007 at 02:51:07AM +0100, Johannes Schindelin wrote:
Hi, On Fri, 6 Jul 2007, Adrian Bunk wrote:quoted
On Fri, Jul 06, 2007 at 02:18:46AM +0100, Johannes Schindelin wrote:quoted
On Fri, 6 Jul 2007, Adrian Bunk wrote:quoted
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.quoted
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