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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 14, 2009, 17:48 UTC
Message-ID
<alpine.DEB.1.00.0904141943060.10279@pacific.mpi-cbg.de>
In-Reply-To
<7vvdp9w9l1.fsf@gitster.siamese.dyndns.org>
Hi,
On Sun, 12 Apr 2009, Junio C Hamano wrote:
Show 5 quoted lines
> * js/add-edit (Wed Apr 8 23:30:24 2009 +0200) 1 commit
>  - git-add: introduce --edit (to edit the diff vs. the index)
> 
> I am Ok with the general idea, but the error detection needs to be more 
> robust than merely relying on --recount.

You mean something like saving an extra copy of the patch, and checking if common or removed lines were either removed or kept intact?

That might turn out to be _very_ tricky.
Example:
@@ <some numbers>
 common line
+added line
 common line
-removed line
 common line
Now, edit it, and come up with
@@ <some numbers>
 common line
+removed line
 common line

It is obvious what is meant, but is there a clear semantics a _computer_ could understand? I do not think so.

If you had some other error checking in mind, please let me hear it.

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 2 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.