From: Adrian Bunk <bunk@stusta.de>
To: git@vger.kernel.org
Subject: git-apply{,mbox,patch} should default to --unidiff-zero
Date: Fri, 6 Jul 2007 01:22:10 +0200 [thread overview]
Message-ID: <20070705232210.GR3492@stusta.de> (raw)
I just ran into the following issue:
I sent someone a patch that purposefully contained a chunk without
context, and git-apply of the recipient refused to apply it without
an explicit --unidiff-zero.
git-apply{,mbox,patch} should default to doing --unidiff-zero:
Generating a patch without context is something I have to do explicitely
by giving "diff" an option or by manually editing the patch. I know
about the dangers of having no context, but there are use cases where
I know that replacing and/or deleting one or more lines is safe even
without context and where I want to avoid context e.g. for avoiding to
clash with other patches.
Example use case:
Look at the file Documentation/feature-removal-schedule.txt in the Linux
kernel. If I want to send someone two independent patches removing
adjanced entries in this file, the patches can be applied in any order
exactly as long as this chunk does not contain any context. Removing an
entry from this file is obviously safe even without any context.
TIA
Adrian
BTW: Please Cc me on replies.
--
"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
next reply other threads:[~2007-07-05 23:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 23:22 Adrian Bunk [this message]
2007-07-06 1:18 ` git-apply{,mbox,patch} should default to --unidiff-zero Johannes Schindelin
2007-07-06 1:42 ` Adrian Bunk
2007-07-06 1:51 ` Johannes Schindelin
2007-07-06 2:26 ` Adrian Bunk
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=20070705232210.GR3492@stusta.de \
--to=bunk@stusta.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 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).