Re: We should add a "git gc --auto" after "git clone" due to commit graph
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 3, 2018, 14:32 UTC
- Message-ID
- <CACsJy8Dan1vRKYceBDVktC6FuzEiF4eHm+jE4gx09sTLL0ykyA@mail.gmail.com>
- In-Reply-To
- <87r2h7gmd7.fsf@evledraar.gmail.com>
On Wed, Oct 3, 2018 at 4:01 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 10 quoted lines
> >> and change the > >> need_to_gc() / cmd_gc() behavior so that we detect that the > >> gc.writeCommitGraph=true setting is on, but we have no commit graph, and > >> then just generate that without doing a full repack. > > > > Or just teach 'git clone' to run 'git commit-graph write ...' > > Then when adding something like the commit graph we'd need to patch both > git-clone and git-gc, it's much more straightforward to make > need_to_gc() more granular.
It is straightforward and misleading. If we organize the code well, patching both would not take much more effort and it reduces wtf? moments reading the code.
-- Duy