Re: [PATCH v3 2/2] shortlog: Test reading a log from a SHA256 repo in a non-git directory
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 16, 2024, 19:25 UTC
- Message-ID
- <ZxATKIRGv4QCM9Td@nand.local>
- In-Reply-To
- <20241016182124.48148-3-wolf@oriole.systems>
On Wed, Oct 16, 2024 at 08:21:24PM +0200, Wolfgang Müller wrote:
Show 7 quoted lines
> git-shortlog(1) might be used outside of a git repository to process a > log obtained from a repository initialized with --object-format=sha256. > Since git-shortlog(1) has no information on the hash algorithm, make > sure that it can still successfully process the log regardless. > > Signed-off-by: Wolfgang Müller <wolf@oriole.systems> > Thanks-to: Patrick Steinhardt <ps@pks.im>
Same note here about ordering Signed-off-by: and Thanks-to: lines as in the previous patch.
Show 7 quoted lines
> @@ -147,6 +147,14 @@ fuzz() > echo | nongit git shortlog --author=author > ' > > +test_expect_success 'shortlog from non-git directory reads log from SHA256 repository' ' > + test_when_finished "rm -rf repo" && > + git init --object-format=sha256 repo &&
I wondered why we needed a separate repo for this test, but I understand now that we need to have a SHA-256 repository to test this on.
I'm still dubious as to the value of this test overall, but I think it may be nice to s/repo/sha256-repo/ or something here to indicate its purpose more clearly in the test itself.
I don't feel strongly about it, though.
Thanks, Taylor