Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Portage, git and shallow cloning
Date: Sat, 14 Jul 2018 12:00:55
Message-Id: 2514831.ueNfWYnaqG@peak
In Reply to: Re: [gentoo-user] Portage, git and shallow cloning by Rich Freeman
1 On Saturday, 14 July 2018 11:40:03 BST Rich Freeman wrote:
2 > On Sat, Jul 14, 2018 at 4:30 AM Peter Humphrey <peter@××××××××××××.uk>
3 wrote:
4 > > On Friday, 6 July 2018 06:34:01 BST Davyd McColl wrote:
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...
12
13 That's all I need for the portage tree, unless removing everything at lower
14 depths will remove the change records.
15
16 > ...and of course you'll need to set up a cron job or something to go
17 > cleaning up past history (you never NEED more than the last commit). If you
18 > browse the online git repo you can see about how many commits there are in a
19 > day and estimate how many you want based on how many days you want.
20 >
21 > Also, this value only matters for the first sync. After that portage
22 > currently doesn't try to discard past commits, and it will always
23 > fetch all commits between your current state and the new head.
24 >
25 > If you want you could set up a script to manually purge history, and
26 > then do an initial sync with 1 depth. Then anytime you sync you could
27 > review the history since the last time you synced, and then run the
28 > purge command to discard all history up to the current commit. In
29 > doing this you'll always see all the history since the last time you
30 > reviewed it.
31
32 Is there something in git to do that purging? If not, perhaps a simple monthly
33 script to delete /usr/portage/* - but not packages or distfiles, which are on
34 separate partitions here - would do the trick.
35
36 --
37 Regards,
38 Peter.

Replies

Subject Author
Re: [gentoo-user] Portage, git and shallow cloning Rich Freeman <rich0@g.o>