Re: [PATCH 1/4] packed-backend: skip checking consistency of empty packed-refs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 06, 2025 at 11:42:37AM -0700, Junio C Hamano wrote:
> shejialuo <shejialuo@xxxxxxxxx> writes:
> 
> > +		touch .git/packed-refs &&
> 
> Unless you want to signal your readers that you care about file
> timestamp somehow, don't use "touch" as a means to create a file.
> Readers would have to wonder if .git/packed-refs existed before,
> or what git command that follows this part cares about its last
> modified time, or what behaviour the timestamp would affect.
> 
> What you are interested in doing with this is to ensure that *AN*
> *EMPTY* file exists there, hence you should say
> 
> 		>.git/packed-refs &&
> 
> instread.

Thanks for the suggestion, I didn't realise about this.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux