git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: add -e, was Re: What's cooking in git.git (Apr 2009, #02; Sun, 12)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 16, 2009, 13:12 UTC
Message-ID
<alpine.DEB.1.00.0904161510080.6798@intel-tinevez-2-302>
In-Reply-To
<7v7i1m3m1m.fsf@gitster.siamese.dyndns.org>
Hi,
On Tue, 14 Apr 2009, Junio C Hamano wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Actually, I am beginning to hate the idea of having this in add -e, 
> > but would prefer it to be in apply ("git apply $PATCH" could -- and 
> > should -- complain when not being called with --unidiff-zero and 
> > encountering a patch that should (but does not) have common context 
> > lines).
> 
> I think it already complains by rejecting.  The thing is, only "add -e" 
> knows that the patch being fed to apply is potentially manually corrupt 
> by the end user.

I think that this extra-check for missing context lines is a substantial amount of work for little use, as the most common mistakes are other things, and _they_ will be hard to catch, as I illustrated.

So, how about adding a warning before the beginning of the patch instead?

Ciao, Dscho

Previous: Junio C Hamano
Message 6 of 6 in “What's cooking in git.git (Apr 2009, #02; Sun, 12)”
  1. Junio C HamanoApr 13, 2009
  2. add -e, was Re: What's cooking in git.git (Apr 2009, #02; Sun, 12)Johannes Schindelin, Apr 14, 2009
  3. Junio C HamanoApr 14, 2009
  4. Johannes SchindelinApr 14, 2009
  5. Junio C HamanoApr 14, 2009
  6. Johannes SchindelinApr 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.