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

Re: [PATCH] make commit --interactive lock index

From
Paolo Bonzini <bonzini@gnu.org>
Date
May 29, 2008, 19:17 UTC
Message-ID
<483F012D.3060308@gnu.org>
In-Reply-To
<20080529185617.GC5596@steel.home>
Alex Riesen wrote:
Show 10 quoted lines
> Paolo Bonzini, Thu, May 29, 2008 20:00:55 +0200:
>>>> The "if() die ()" thingie is already in builtin-commit.c, so we won't 
>>>>  ever get a pathspec in the "add --interactive" case.  If we do,   
>>>> something else has already been done incorrectly before -- not by the 
>>>>  user but by the programmer.
>>> What could that be?
>> Nothing, but it documents to whoever reads the code what is the path  
>> that will be taken.  Anyway if it happened it would be very bad.
> 
> Why is a comment not enough?

I tend to use comment if it is more interesting to express the condition in English, and asserts if it is more interesting to express it as code.

Paolo
Previous: Alex RiesenNext: Junio C Hamano
Message 9 of 12 in “make commit --interactive lock index”
  1. make commit --interactive lock indexPaolo Bonzini, May 29, 2008
  2. Johannes SchindelinMay 29, 2008
  3. Paolo BonziniMay 29, 2008
  4. Johannes SchindelinMay 29, 2008
  5. Paolo BonziniMay 29, 2008
  6. Alex RiesenMay 29, 2008
  7. Paolo BonziniMay 29, 2008
  8. Alex RiesenMay 29, 2008
  9. Paolo BonziniMay 29, 2008
  10. Junio C HamanoMay 30, 2008
  11. Paolo BonziniMay 30, 2008
  12. Paolo BonziniJun 2, 2008

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.