git/list[1] front-page[2] threads[3] people[4] search[5] about
 

commit-graph idea: warn when disabled for incompatible repositories

From
Thomas Ferris Nicolaisen <tfnico@gmail.com>
Date
Dec 18, 2018, 14:22 UTC
Message-ID
<CAEcj5uXJC3Za0YCyazJi82JdF-tLCDs5OrzCwyD8Y155GnJa6Q@mail.gmail.com>
Hey there,
I recently started dabbling with commit-graph.

Accidentally, my first use-case was a local copy of a big repository (chromium source) that another developer had cloned shallow (I wasn't even aware of their clone being shallow at that point).

After spending a little time trying to figure out why no commit-graph file was being created, I noticed that it worked just fine testing in a fresh git repo.

Then I discovered the .git/shallow file in the big repo. So I did fetch --unshallow, and commit-graph started working. Taking a 20 second log --graph operation down to less than a second (wooo!).

I saw some recent release notes that mentions that commit-graph is disabled in incompatible repositories (graft, replace). I assume this also be the case for shallow clones.

Here's the idea that may help others on the same path: Some warning output when attempting to use commit-graph when it is disabled (either by configuration or automatically).

I think others that come across commit-graph may have tried such tricks (like shallow clones) to better work with their repositories, and it could be frustrating that commit-graph has no apparent effect.

Apologies if this is a stupid/bad/old idea!
Next: Derrick Stolee
Message 1 of 4 in “commit-graph idea: warn when disabled for incompatible repositories”
  1. Thomas Ferris NicolaisenDec 18, 2018
  2. Derrick StoleeDec 18, 2018
  3. Ævar Arnfjörð BjarmasonDec 18, 2018
  4. Derrick StoleeDec 18, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.