How to write to the commit graph on clone?

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

 



> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux