1 |
On 2022-04-27, Rich Freeman <rich0@g.o> wrote: |
2 |
> On Wed, Apr 27, 2022 at 10:22 AM Grant Edwards |
3 |
><grant.b.edwards@×××××.com> wrote: |
4 |
>> |
5 |
>> Is there any advantage (either to me or the Gentoo community) to |
6 |
>> continue to use rsync and the rsync pool instead of switching the |
7 |
>> rest of my machines to git? |
8 |
>> |
9 |
>> I've been very impressed with the reliability and speed of sync |
10 |
>> operations using git they never take more than a few seconds. |
11 |
> |
12 |
> With git you might need to occasionally wipe your repository to |
13 |
> delete history if you don't want it to accumulate (I don't think |
14 |
> there is a way to do that automatically but if you can tell git to |
15 |
> drop history let me know). |
16 |
|
17 |
I don't think I have any history. I use sync-depth=1 and clone-depth=1. |
18 |
|
19 |
Both git log and git whatchanged only show one commit. |
20 |
|
21 |
|
22 |
> Of course that history can come in handy if you need to revert |
23 |
> something/etc. |
24 |
|
25 |
Perhaps I should keep a few levels of history... |
26 |
|
27 |
> If you sync infrequently - say once a month or less frequently, then |
28 |
> I'd expect rsync to be faster. |
29 |
|
30 |
I generally sync several times a week, and git is often very much |
31 |
faster than rsync. Git is always done in a few seconds. The time |
32 |
required for rsync varies widely from a handfull of seconds to tens of |
33 |
minutes. |
34 |
|
35 |
> This is because git has to fetch every single set of changes since |
36 |
> the last sync, while rsync just compares everything at a file level. |
37 |
> [...] |
38 |
> That can add up if it has been a long time. |
39 |
|
40 |
AFAICT, the emerge repo git "depth" settings of 1 prevent that: the |
41 |
intermediate versions are discarded on the server side as is previous |
42 |
local history. The end result is similar to rsync: you fetch only the |
43 |
current version of what's changed since the last "sync", and there's |
44 |
no local history. |
45 |
|
46 |
> Bottom line is that I think git just makes more sense these days for |
47 |
> the typical gentoo user, who is far more likely to be interested in |
48 |
> things like changelogs and commit histories than users of other |
49 |
> distros. I'm not saying it is always the best choice for everybody, |
50 |
> but you should consider it and improve your git-fu if you need to. |
51 |
> Oh, and if you want the equivalent of an old changelog, just go into a |
52 |
> directory and run "git whatchanged ." |
53 |
|
54 |
Right now with a depth of 1, git log/whatchanged don't provide any |
55 |
information (they think all files were new as of the last "sync"). |
56 |
What I should figure out is what settings will preserver a few levels |
57 |
of changes that have been made to my local repo, without preserving |
58 |
intermediate changes to the master repo that never got used locally. |
59 |
|
60 |
IOW, I want all the changes made during a single "sync" to go into my |
61 |
local repo as a single commit regardless of how many commits have been |
62 |
made to the master repo since my previous "sync". I think git can do |
63 |
that -- whether the emerge sync settings in /etc/portage/repos.conf/gentoo.conf |
64 |
allow me to tell emerge to tell git to do that is the question. |
65 |
|
66 |
-- |
67 |
Grant |