From: Derrick Stolee Date: Tue, 03 Sep 2024 14:17:14 GMT Subject: Re: [PATCH v2 2/2] Mark 'git cat-file' sparse-index compatible Message-ID: <83ec9352-d274-4d05-a6b8-d33924f46205@gmail.com> In-Reply-To: On 8/30/24 5:10 PM, Kevin Lyles via GitGitGadget wrote: > From: Kevin Lyles > +test_expect_success 'cat-file -p' ' > + init_repos && > + echo "new content" >>full-checkout/deep/a && > + echo "new content" >>sparse-checkout/deep/a && > + echo "new content" >>sparse-index/deep/a && > + run_on_all git add deep/a && > + > + test_all_match git cat-file -p :deep/a && > + ensure_not_expanded cat-file -p :deep/a && > + test_all_match git cat-file -p :folder1/a && > + ensure_expanded cat-file -p :folder1/a' There's one style issue that I missed in the previous version, which is that the final single-quote (') should be on a new line after the last line of the test. like this: --- test_all_match git cat-file -p :folder1/a && ensure_expanded cat-file -p :folder1/a ' --- > +test_expect_success 'cat-file --batch' ' > + init_repos && > + echo "new content" >>full-checkout/deep/a && > + echo "new content" >>sparse-checkout/deep/a && > + echo "new content" >>sparse-index/deep/a && > + run_on_all git add deep/a && > + > + echo ":deep/a">in && > + test_all_match git cat-file --batch + ensure_not_expanded cat-file --batch + > + echo ":folder1/a">in && > + test_all_match git cat-file --batch + ensure_expanded cat-file --batch + > + cat <<-\EOF >in && nit: typically we would write this as "cat >in <<-\EOF &&" > + :deep/a > + :folder1/a > + EOF > + test_all_match git cat-file --batch + ensure_expanded cat-file --batch + Pointing out the final single-quote here, too. Thank you for updating the heredocs and other format things that I noticed in the previous version. Also, thanks for splitting the patch into two parts. Thanks for working on this! -Stolee