[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Sharing git repositories
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Sharing git repositories |
Date: |
Sat, 14 Mar 2020 00:26:18 +0100 |
On Fri, 13 Mar 2020 22:55:16 +0000 Greg Chicares <address@hidden> wrote:
GC> On 2020-03-11 00:13, Vadim Zeitlin wrote:
GC> > On Tue, 10 Mar 2020 23:33:34 +0000 Greg Chicares <address@hidden> wrote:
GC> >
GC> > GC> Wouldn't it make more sense to return to the original design
intention,
GC> > GC> so that /var/cache_for_lmi/ would hold only bare repositories with
GC> > GC> 'core.sharedRepository' set for all?
GC> I've found it really difficult to make a git repository usable by
GC> multiple accounts. Please take a look at lmi commit ec1bd048fa,
GC> which I've just now pushed, and tell me if I'm missing something.
GC> It just seems that there must be some easier way.
Yes, but you seem to have already discovered it and yet discarded it for
some reason. To me, the following seems easy, even if not very short,
because each step is perfectly logical:
$ git init --bare --shared zlib.git
$ chgrp -R audio zlib.git # not necessary if it's your main group
$ cd zlib.git
$ git remote add origin https://github.com/wxWidgets/zlib.git
$ git fetch origin
The first two steps could be combined into one if you'd like by using
"sudo -g audio git init ...". The last two steps could be combined into one
if you're ready to specify what to fetch explicitly by doing "git fetch
https://github.com/wxWidgets/zlib.git 'refs/heads/*:refs/remotes/origin/*'"
to fetch more or less everything or, if you need just master, a more
reasonable "git fetch https://github.com/wxWidgets/zlib.git master".
I'm not sure how much simpler can it be. It's true that, AFAICS, this
can't be done using a single "git clone", but this is not something you are
supposed to do often, as bare repositories are typically long-lived, and
what is basically just 2 commands (or really just 2 commands if you use "-C
zlib.git" instead of an extra "cd") doesn't seem terribly complicated to
me.
In any case, this is the best I can propose. Is it still not good enough?
VZ
pgphifwqn380m.pgp
Description: PGP signature
- Re: [lmi] Sharing git repositories, (continued)
Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/04
- Re: [lmi] Sharing git repositories, Vadim Zeitlin, 2020/03/04
- Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/09
- Re: [lmi] Sharing git repositories, Vadim Zeitlin, 2020/03/09
- Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/10
- Re: [lmi] Sharing git repositories, Vadim Zeitlin, 2020/03/10
- Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/13
- Re: [lmi] Sharing git repositories,
Vadim Zeitlin <=
- Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/16
- Re: [lmi] Sharing git repositories, Vadim Zeitlin, 2020/03/16
- Re: [lmi] Sharing git repositories, Greg Chicares, 2020/03/17
- Re: [lmi] Sharing git repositories, Vadim Zeitlin, 2020/03/17