git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "Rohit Ner" <rohitner1@gmail.com>,
	"Derrick Stolee" <derrickstolee@github.com>,
	git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>
Subject: How to write to the commit graph on clone?
Date: Sun, 16 Apr 2023 14:46:49 +0200	[thread overview]
Message-ID: <743b64a0-8731-46b8-a456-aaa51e310b9b@app.fastmail.com> (raw)
In-Reply-To: <20230416070906.GA3271@szeder.dev>

> 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?

-- 
Kristoffer Haugsbakk

  reply	other threads:[~2023-04-16 12:47 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           ` Kristoffer Haugsbakk [this message]
2023-04-16 15:24             ` How to write to the commit graph on clone? Ævar Arnfjörð Bjarmason

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=743b64a0-8731-46b8-a456-aaa51e310b9b@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).