emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tip: git commit-graph


From: Yuri Khan
Subject: Re: Tip: git commit-graph
Date: Thu, 12 Oct 2023 00:53:55 +0700

On Thu, 12 Oct 2023 at 00:25, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:

> >> A tip for people with slow machines,
> >>
> >> https://devblogs.microsoft.com/devops/updates-to-the-git-commit-graph-feature/
> >>
> >> This speeds up topological sorting of git commits, which is, for
> >> instance, used in git log --graph, which in turn is default in Magit.
> >
> > This seems to have been turned on by default 4 years ago and present
> > in two latest Ubuntu LTS releases (20.04 and 22.04) and two latest
> > Debian stables (bullseye and bookworm), so… which categories of Git
> > users would not already have it by now?
>
> I'm not sure what you mean by activated.
>
> Do you mean that on these systems, .git/objects/info/callgraphs is
> always generated?  I'm no macOS 14.0, BTW, and I'm pretty sure that it
> wasn't generated, because of the speed difference I observe.

Hm. The article says

> In the recently released Git version 2.24.0, the commit-graph is enabled by 
> default!

but what it actually seems to mean is that 2.24 changes the defaults
for two configuration variables to ‘true’:

* ‘core.commitGraph’ which instructs Git to *use* the file if present; and
* ‘gc.writeCommitGraph’ which instructs it to *create or update* the
file on every invocation of ‘git gc’.

So this answers my question: Users who have not run ‘git gc’ since
2019, or ‘git commit-graph write’ ever, will not already have a
serialized commit graph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]