Re: [GSoC PATCH v3 2/5] pack-write: add helper to fill promisor file after repack
- From
Lorenzo Pegorari <lorenzo.pegorari2002@gmail.com>
- Date
- Apr 7, 2026, 21:52 UTC
- Message-ID
- <adV8iP668rgxK-9k@lorenzo-VM>
- In-Reply-To
- <xmqqy0iz7clt.fsf@gitster.g>
On Mon, Apr 06, 2026 at 07:01:18PM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> Lorenzo Pegorari <lorenzo.pegorari2002@gmail.com> writes:
> > On Tue, Apr 07, 2026 at 01:22:16AM +0800, Tian Yuchen wrote:
> >> On 4/6/26 08:24, LorenzoPegorari wrote:
> >> > +
> >> > + /* If <time> doesn't exist, retrieve it and add it to line */
> >> > + if (!parts[2]) {
> >> > + struct tm tm;
> >> > + localtime_r(&source_stat.st_mtim.tv_sec, &tm),
> >>
> >> Typo.
> >
> > Ack.
>
> Not just an unintended use of comma operator, this is not portable
> and breaks OSX build
>
> https://github.com/git/git/actions/runs/24058681172/job/70170218891#step:4:213Yeah, I was shocked that it compiled at all on my system with no issue whatsoever.
Show 6 quoted lines
> >> > + strbuf_addch(&line, ' '); > >> > + strbuf_addftime(&line, "%Y/%m/%d-%H:%M:%S", &tm, 0, 0); > > I suspect that storing seconds since epoch as a large integer would > be simpler and much less error prone than storing localtime in > textual form without even recording the timezone.
Yeah, maybe for this kinda specific debugging info being less error prone is more important then "looking good". Will do that.
Thanks, Lorenzo