Thread (1 message) 1 message, 1 author, 2017-02-10

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

From: Junio C Hamano <hidden>
Date: 2017-02-10 21:04:16

Jeff King [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help