From: Han Xin Date: Tue, 11 Jan 2022 10:41:11 GMT Subject: Re: [PATCH v8 1/6] unpack-objects: low memory footprint for get_data() in dry_run mode Message-ID: In-Reply-To: <8f9dd345-56c4-9a20-151b-e0e6d1a5b3fa@web.de> On Sat, Jan 8, 2022 at 8:28 PM René Scharfe wrote: > > Am 08.01.22 um 09:54 schrieb Han Xin: > > From: Han Xin > > > > +assert_no_loose () { > > + glob=dest.git/objects/?? && > > + echo "$glob" >expect && > > + eval "echo $glob" >actual && > > + test_cmp expect actual > > +} > > + > > +assert_no_pack () { > > + rmdir dest.git/objects/pack > > I would expect a function whose name starts with "assert" to have no > side effects. It doesn't matter here, because it's called only at the > very end, but that might change. You can use test_dir_is_empty instead > of rmdir. > *nod* I think it would be better to rename "assert_no_loose()" to "test_no_loose()". I will remove "assert_no_pack()" and use "test_dir_is_empty()" instead. Thanks -Han Xin