Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Portage, git and shallow cloning
Date: Sat, 14 Jul 2018 10:40:26
Message-Id: CAGfcS_k8gJPonDqy8TfDKr1JC0ZXh_uwyRSAcHw9fOZ79qB0-Q@mail.gmail.com
In Reply to: Re: [gentoo-user] Portage, git and shallow cloning by Peter Humphrey
1 On Sat, Jul 14, 2018 at 4:30 AM Peter Humphrey <peter@××××××××××××.uk> wrote:
2 >
3 > On Friday, 6 July 2018 06:34:01 BST Davyd McColl wrote:
4 >
5 > > 1) `sync-depth` has been deprecated (should now use `clone-depth`)
6 >
7 > But to what value should clone-depth be set?
8
9 That comes down to personal taste. Do you want any history to be able
10 to browse it? More depth means more history. If all you want is the
11 current tree without history then you want a depth of 1, and of course
12 you'll need to set up a cron job or something to go cleaning up past
13 history (you never NEED more than the last commit). If you browse the
14 online git repo you can see about how many commits there are in a day
15 and estimate how many you want based on how many days you want.
16
17 Also, this value only matters for the first sync. After that portage
18 currently doesn't try to discard past commits, and it will always
19 fetch all commits between your current state and the new head.
20
21 If you want you could set up a script to manually purge history, and
22 then do an initial sync with 1 depth. Then anytime you sync you could
23 review the history since the last time you synced, and then run the
24 purge command to discard all history up to the current commit. In
25 doing this you'll always see all the history since the last time you
26 reviewed it.
27
28 --
29 Rich

Replies

Subject Author
Re: [gentoo-user] Portage, git and shallow cloning Peter Humphrey <peter@××××××××××××.uk>