On 2022-04-27, Rich Freeman <ri...@gentoo.org> wrote:
> On Wed, Apr 27, 2022 at 10:22 AM Grant Edwards
><grant.b.edwa...@gmail.com> wrote:
>>
>> Is there any advantage (either to me or the Gentoo community) to
>> continue to use rsync and the rsync pool instead of switching the
>> rest of my machines to git?
>>
>> I've been very impressed with the reliability and speed of sync
>> operations using git they never take more than a few seconds.
>
> With git you might need to occasionally wipe your repository to
> delete history if you don't want it to accumulate (I don't think
> there is a way to do that automatically but if you can tell git to
> drop history let me know).

I don't think I have any history. I use sync-depth=1 and clone-depth=1.

Both git log and git whatchanged only show one commit.


> Of course that history can come in handy if you need to revert
> something/etc.

Perhaps I should keep a few levels of history...

> If you sync infrequently - say once a month or less frequently, then
> I'd expect rsync to be faster.

I generally sync several times a week, and git is often very much
faster than rsync. Git is always done in a few seconds. The time
required for rsync varies widely from a handfull of seconds to tens of
minutes.

> This is because git has to fetch every single set of changes since
> the last sync, while rsync just compares everything at a file level.
> [...]
> That can add up if it has been a long time.

AFAICT, the emerge repo git "depth" settings of 1 prevent that: the
intermediate versions are discarded on the server side as is previous
local history. The end result is similar to rsync: you fetch only the
current version of what's changed since the last "sync", and there's
no local history.

> Bottom line is that I think git just makes more sense these days for
> the typical gentoo user, who is far more likely to be interested in
> things like changelogs and commit histories than users of other
> distros.  I'm not saying it is always the best choice for everybody,
> but you should consider it and improve your git-fu if you need to.
> Oh, and if you want the equivalent of an old changelog, just go into a
> directory and run "git whatchanged ."

Right now with a depth of 1, git log/whatchanged don't provide any
information (they think all files were new as of the last "sync").
What I should figure out is what settings will preserver a few levels
of changes that have been made to my local repo, without preserving
intermediate changes to the master repo that never got used locally.

IOW, I want all the changes made during a single "sync" to go into my
local repo as a single commit regardless of how many commits have been
made to the master repo since my previous "sync". I think git can do
that -- whether the emerge sync settings in /etc/portage/repos.conf/gentoo.conf
allow me to tell emerge to tell git to do that is the question.

--
Grant






Reply via email to