From: Stefan Sperling Subject: Re: fix got_packidx_match_id_str_prefix() To: Thomas Adam Cc: gameoftrees@openbsd.org Date: Mon, 3 Jan 2022 22:52:18 +0100 On Mon, Jan 03, 2022 at 01:50:52PM +0000, Thomas Adam wrote: > On Mon, Jan 03, 2022 at 02:40:06PM +0100, Stefan Sperling wrote: > > An object ID which begins with "00" cannot be used from the command line. > > > > $ got log -c 00b9e9a4562e4f0acdca9b52fe1de269d7f8ba94 > > got: commit 00b9e9a4562e4f0acdca9b52fe1de269d7f8ba94: object not found > > > > $ got cat 00b9e9a4562e4f0acdca9b52fe1de269d7f8ba94 > > got: 00b9e9a4562e4f0acdca9b52fe1de269d7f8ba94: object not found > > > > However, this commit object does indeed exist: > > > > $ gotadmin ls .git/objects/pack/pack-3822a2686597f4ca864b9b18f8b5836af5407da2.pack | head -n1 > > 00b9e9a4562e4f0acdca9b52fe1de269d7f8ba94 commit at 12 size 195 > > > > This bug triggered test failures in the following histedit.sh tests: > > > > test_histedit_fold_last_commit > > test_histedit_fold_missing_commit > > Ah. Well-spotted! This looks good to me. Thanks! I have committed this fix.