From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Rohit Ner" <rohitner1@gmail.com>,
"Derrick Stolee" <derrickstolee@github.com>,
git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>
Subject: Re: How to write to the commit graph on clone?
Date: Sun, 16 Apr 2023 17:24:33 +0200 [thread overview]
Message-ID: <230416.86edojsvc6.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <743b64a0-8731-46b8-a456-aaa51e310b9b@app.fastmail.com>
On Sun, Apr 16 2023, Kristoffer Haugsbakk wrote:
>> The commit-graph has been enabled by default in v2.24.0, released over
>> three years ago. I wonder why Rohit's and/or Kristoffer's repos
>> didn't have it already?!
>
> I might have done a fresh clone of Linux right before I replied to this
> email thread, or else it might have just been lying around. (I don’t
> work on Linux. ;)
>
> I found out that I need to add this to my Git config in order for the
> commit graph to be updated on `git fetch`, so I added it:
>
> [fetch]
> writeCommitGraph = true
>
> I was wondering if this would help with cloning, so I did a fresh one:
>
> $ git clone https://github.com/torvalds/linux/ linux-github-2
> $ cd linux-github-2/
> $ time git log --oneline --graph | head -1
> * 3e7bb4f24617 Merge tag '6.3-rc6-smb311-client-negcontext-fix' of git://git.samba.org/sfrench/cifs-2.6
>
> real 0m10.364s
> user 0m9.700s
> sys 0m0.666s
>
> So no.
>
> But doing a `git fetch origin` fixed it:
>
> $ git fetch origin
> Expanding reachable commits in commit graph: 1171056, done.
> Writing out commit graph in 5 passes: 100% (5855280/5855280), done.
> $ time git log --oneline --graph | head -1
> * 3e7bb4f24617 Merge tag '6.3-rc6-smb311-client-negcontext-fix' of git://git.samba.org/sfrench/cifs-2.6
>
> real 0m0.017s
> user 0m0.007s
> sys 0m0.013s
>
> Is there any config for writing to the commit graph on clone?
I don't think there is, but here's a lengthy discussion I started a
while ago about having some "on glone gc", which would cover this:
https://lore.kernel.org/git/87tvm3go42.fsf@evledraar.gmail.com/
I haven't re-read it just now, but if you're interested that should be a
good place to start.
prev parent reply other threads:[~2023-04-16 15:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 20:13 git log causing hang while browsing upstream linux Rohit Ner
2023-04-04 20:27 ` Kristoffer Haugsbakk
2023-04-04 20:50 ` Kristoffer Haugsbakk
2023-04-10 17:07 ` Rohit Ner
2023-04-11 0:00 ` Taylor Blau
2023-04-11 9:45 ` Kristoffer Haugsbakk
2023-04-16 7:09 ` SZEDER Gábor
2023-04-16 12:46 ` How to write to the commit graph on clone? Kristoffer Haugsbakk
2023-04-16 15:24 ` Ævar Arnfjörð Bjarmason [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=230416.86edojsvc6.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=me@ttaylorr.com \
--cc=rohitner1@gmail.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.