Re: Crashes while trying to show tag objects with bad timestamps

2013-02-25 Thread Jeff King
On Fri, Feb 22, 2013 at 03:20:10PM -0800, Junio C Hamano wrote: > As pp_user_info() is called from very few places, I do not think it > is unreasonable to add an output parameter (i.e. "unsigned *") to > let the caller know that we made a best guess given malformed input > and handle the error in

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-25 Thread Jeff King
On Sat, Feb 23, 2013 at 01:14:40AM +0200, Mantas Mikulėnas wrote: > > Then I think it would make sense to allow the very specific no-date tag, > > but not allow arbitrary crud. I wonder if there's an example in the > > kernel or in git.git. > > I couldn't find any such examples. However, I did fi

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Junio C Hamano
Jeff King writes: > On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote: > >> > I guess we should probably issue a warning, too. Also disappointingly, >> > git-fsck does not seem to detect this breakage at all. >> >> Yes for the warning, > > Unfortunately, a good warning is harder th

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Mantas Mikulėnas
On Sat, Feb 23, 2013 at 1:04 AM, Jeff King wrote: > On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote: >> and no for disappointing. IIRC, in the very early implementations >> allowed tag object without dates. >> >> I _think_ we can start tightening fsck, though. > > Then I think it w

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Jeff King
On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote: > > I guess we should probably issue a warning, too. Also disappointingly, > > git-fsck does not seem to detect this breakage at all. > > Yes for the warning, Unfortunately, a good warning is harder than I had hoped. At the point w

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Junio C Hamano
Jeff King writes: > I guess we should probably issue a warning, too. Also disappointingly, > git-fsck does not seem to detect this breakage at all. Yes for the warning, and no for disappointing. IIRC, in the very early implementations allowed tag object without dates. I _think_ we can start ti

Re: Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Jeff King
On Sat, Feb 23, 2013 at 12:30:28AM +0200, Mantas Mikulėnas wrote: > When messing around with various repositories, I noticed that git 1.8 > (currently using 1.8.2.rc0.22.gb3600c3) has problems parsing tag objects > that have invalid timestamps. > > Times in tag objects appear to be kept as Unix t

Crashes while trying to show tag objects with bad timestamps

2013-02-22 Thread Mantas Mikulėnas
When messing around with various repositories, I noticed that git 1.8 (currently using 1.8.2.rc0.22.gb3600c3) has problems parsing tag objects that have invalid timestamps. Times in tag objects appear to be kept as Unix timestamps, but I didn't realize this at first, and ran something roughly equi