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

2017-02-10 Thread Jeff King
On Fri, Feb 10, 2017 at 09:23:15PM +, David Turner wrote: > > Speaking of stderr, I wonder if this function should be calling > > fflush(stderr) before looking at the fstat result. There could be contents > > buffered > > there that haven't been written out yet (not from child processes, but

RE: [PATCH v5] gc: ignore old gc.log files

2017-02-10 Thread David Turner
> -Original Message- > From: Jeff King [mailto:p...@peff.net] > Sent: Friday, February 10, 2017 4:15 PM > To: David Turner <david.tur...@twosigma.com> > Cc: git@vger.kernel.org; pclo...@gmail.com; Junio C Hamano > <gits...@pobox.com> > Subject: Re: [PATC

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

2017-02-10 Thread Jeff King
> @@ -76,10 +78,30 @@ static void git_config_date_string(const char *key, const > char **output) > static void process_log_file(void) > { > struct stat st; > - if (!fstat(get_lock_file_fd(_lock), ) && st.st_size) > + if (fstat(get_lock_file_fd(_lock), )) { > + /* > +