From: Duy Nguyen Date: Wed, 03 Oct 2018 14:32:48 GMT Subject: Re: We should add a "git gc --auto" after "git clone" due to commit graph Message-ID: In-Reply-To: <87r2h7gmd7.fsf@evledraar.gmail.com> On Wed, Oct 3, 2018 at 4:01 PM Ævar Arnfjörð Bjarmason wrote: > >> 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