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

Re: [PATCH] git-commit: exit non-zero if we fail to commit the index

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jan 17, 2008, 01:49 UTC
Message-ID
<478EB430.1040604@nrlssc.navy.mil>
In-Reply-To
<7vir1tmey8.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 13 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> writes:
> 
>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
>> ---
>>
>>
>> Shouldn't we be doing this? I think if quiet is set,
>> then a failed rename will go undetected since we
>> won't enter print_summary to have lookup_commit fail.
> 
> But then it's a bit too late, isn't it?  We already have
> successfully made the commit and updated the HEAD to point at
> it.

Ok, so the commit has been made, but the index (since the rename failed), is out of sync?

>  We would need to tell the user that the index is not where
> it is when we detect the error, though.
The new index we are trying to rename will be deleted.
Are you saying we should 
  warn the user that the index is now out of sync?
  Or prevent the deletion of the updated index?
  or just ignore this case which I now see as very unlikely to occur?
-brandon
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “git-commit: exit non-zero if we fail to commit the index”
  1. git-commit: exit non-zero if we fail to commit the indexBrandon Casey, Jan 17, 2008
  2. Junio C HamanoJan 17, 2008
  3. Brandon CaseyJan 17, 2008
  4. Junio C HamanoJan 17, 2008
  5. git-commit: exit non-zero if we fail to commit the indexBrandon Casey, Jan 22, 2008
  6. Junio C HamanoJan 22, 2008
  7. git-commit: exit non-zero if we fail to commit the indexBrandon Casey, Jan 23, 2008
  8. Junio C HamanoJan 23, 2008
  9. Brandon CaseyJan 23, 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.