Re: [PATCH v8 1/6] unpack-objects: low memory footprint for get_data() in dry_run mode
- From
- Han Xin <chiyutianyi@gmail.com>
- Date
- Jan 11, 2022, 10:41 UTC
- Message-ID
- <CAO0brD17MC4THrGVNq70ey+vP-9-W28kZD4y8Fn1mVqyEbEbKA@mail.gmail.com>
- In-Reply-To
- <8f9dd345-56c4-9a20-151b-e0e6d1a5b3fa@web.de>
On Sat, Jan 8, 2022 at 8:28 PM René Scharfe <l.s.r@web.de> wrote:
Show 19 quoted lines
>
> Am 08.01.22 um 09:54 schrieb Han Xin:
> > From: Han Xin <hanxin.hx@alibaba-inc.com>
> >
> > +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