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

Re: [PATCH v3] gc: ignore old gc.log files

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2017, 21:04 UTC
Message-ID
<xmqqlgtdkbau.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170210205138.5nnexap32pkbjjrk@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> I dunno. This seems like a lot of manual scrambling to try to overcome
> unlikely errors just to make our stderr heard (and we'd still fail in
> some cases). It seems like:
>
>   if (fstat(...)) {
> 	/* weird, fstat failed; try our best to mention it */
> 	error_errno("unable to fstat gc.log.lock");
> 	commit_lock_file(&log_lock));
>   } else if (st.st_size) {
> 	/* we have new errors to report */
> 	commit_lock_file(&log_lock);
>   } else {
> 	/* no new errors; clean up old ones */
> 	unlink(git_path("gc.log"));
> 	rollback_lock_file(&log_lock);
>   }
>
> would be sufficient.
Yeah, that should be sufficient.
Previous: Jeff King
Message 7 of 7 in “gc: ignore old gc.log files”
  1. gc: ignore old gc.log filesDavid Turner, Feb 10, 2017
  2. Junio C HamanoFeb 10, 2017
  3. Junio C HamanoFeb 10, 2017
  4. Jeff KingFeb 10, 2017
  5. David TurnerFeb 10, 2017
  6. Jeff KingFeb 10, 2017
  7. Junio C HamanoFeb 10, 2017

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.