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

Re: [PATCH] git add -e documentation: rephrase note

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2009, 07:07 UTC
Message-ID
<7vaazn7tg4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091019063446.GA1457@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> > +* remove addition lines (don't stage the line)
>> 
>> This is more like "don't add the line", isn't it?  Also if this "+" line
>> has corresponding "-" line (i.e. it is a "rewrite to this" line), removal
>> of such a line would mean "instead of rewriting, remove it".
>
> I was trying not to use "add" because we are already talking about
> addition and removal in the patch itself,
Ah, I wasn't saying "add" is more kosher than "stage" by the above.

By "don't add", I meant that the user is saying "I inserted a new line to the file, but I actually did not want to add that line to the file for the next commit." In other words, I was more focusing on the act of inserting the line to the contents, not on staging the change to the index.

> ... So I am not sure I agree that using "add" is any
> better than "stage", but I don't feel that strongly about it.
That is Ok; the comment was not about stage vs add.
Show 6 quoted lines
> But beyond that, yes, you are right that removing a "+" line may have a
> different conceptual meaning to the user depending on the surrounding
> text. I wonder if such a "check-list" document really makes much sense,
> given that using "-e" at all means you need to understand the patch
> format and what makes sense (i.e., anybody who understands 'patch' knows
> that you can't just delete context lines and expect it to apply).

Yeah, that is really what I wanted people who are in this discussion to eventually realize ;-)

> Yeah, again, this comes down to understanding what you are doing:
Previous: Jeff KingNext: Wesley J. Landaker
Message 8 of 10 in “git add -e documentation: rephrase note”
  1. git add -e documentation: rephrase noteMiklos Vajna, Oct 14, 2009
  2. Jeff KingOct 14, 2009
  3. git add -e documentation: rephrase noteMiklos Vajna, Oct 19, 2009
  4. Jeff KingOct 19, 2009
  5. Jeff KingOct 19, 2009
  6. Junio C HamanoOct 19, 2009
  7. Jeff KingOct 19, 2009
  8. Junio C HamanoOct 19, 2009
  9. Wesley J. LandakerOct 19, 2009
  10. Junio C HamanoOct 20, 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.