From: Junio C Hamano Date: Tue, 12 Apr 2022 15:45:20 GMT Subject: Re: [PATCH 4/4] object-name: diagnose trees in index properly Message-ID: In-Reply-To: <1f027d22-9c5c-7ccf-37e7-611d67de7cfd@github.com> Derrick Stolee writes: > The reason for test_sparse_match instead of test_all_match is because the > error messages change depending on the existence of the path in the > worktree. For example "git show :folder1/" in the test script would have > this output difference: > > + diff -u full-checkout-err sparse-checkout-err > --- full-checkout-err 2022-04-12 13:35:51.430805689 +0000 > +++ sparse-checkout-err 2022-04-12 13:35:51.430805689 +0000 > @@ -1 +1 @@ > -fatal: path 'folder1/' exists on disk, but not in the index > +fatal: path 'folder1/' does not exist (neither on disk nor in the index) Ah, because naturally folder1/ would not be on disk if it is outside the sparse cones? Makes sense. Thanks.