git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: Victor Engmark <victor.engmark@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: RFC: Folder Git
Date: Tue, 26 Apr 2011 17:03:44 +1000	[thread overview]
Message-ID: <BANLkTin5JV3WSMDvA3E-oJUMCxsy8uByhw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikkFgCQP9DA5VwMCMzDCiTnEENvOg@mail.gmail.com>

A concept I played with at one point was to have the idea of a working
set, which is a list repos.

You could then apply to the whole working set any command after
changing to the root directory of each repo, much like git submodules
does, but without any suggestion of any other relationship between the
repos.

The details working set were stored in the global git configuration.

In principle, you could have multiple working sets and switch which
one was active at a given time.

So, you'd do something like:

git working-set foreach {cmd} {args...}
git working-set activate working-set-name
git working-set add repo-url
git working-set remove repo-url

and so on...

jon.

On Tue, Apr 26, 2011 at 4:47 PM, Victor Engmark
<victor.engmark@gmail.com> wrote:
> On Mon, Apr 25, 2011 at 10:52 AM, Jon Seymour <jon.seymour@gmail.com> wrote:
>> On Mon, Apr 25, 2011 at 6:32 PM, Victor Engmark
>> <victor.engmark@gmail.com> wrote:
>> continue to other repositories.
>>>
>>> Issues:
>>> * Don't know if anyone else has used it. Probably not, so there's
>>> bound to be issues (especially since it's been changed quite a bit the
>>> last couple days for this RFC).
>>>
>>
>> Victor,
>>
>> Certainly seems like a common need. I had a similar solution which I
>> used for a while.
>>
>> In the end, however, I found that creating a super-module in the top
>> directory that contains
>> the other git directories as git submodules allowed me to use a
>> standard feature of git to achieve the same effect.
>>
>> So:
>>
>>    git submodule foreach git gc --aggressive
>>
>> I know this won't suit every use case, but it does work in an
>> environment where the set of repos you are operating on have a degree
>> of coherence and it makes sense to set up a submodule for them.  In
>> this particular case this is the only reason why I use submodules - I
>> don't use them for configuration management, for example, simply as a
>> handy way to exploit git submodule foreach.
>>
>> Have you considered using git submodules in this way?
>
> I didn't know you could use them this way, and it's a nicely "Gitonic"
> way of doing it. I don't think this would fit my case, since the repos
> are not much related and it's a more verbose solution which takes
> longer to set up than copying a single script. A compromise could be
> to set up a Git alias `sgit="git submodule foreach git"`, if that'll
> work as expected.
>
> --
> Victor Engmark
>

  reply	other threads:[~2011-04-26  7:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25  8:32 RFC: Folder Git Victor Engmark
2011-04-25  8:52 ` Jon Seymour
2011-04-26  6:47   ` Victor Engmark
2011-04-26  7:03     ` Jon Seymour [this message]
2011-04-25 10:39 ` Jakub Narebski
2011-04-26  6:59   ` Victor Engmark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTin5JV3WSMDvA3E-oJUMCxsy8uByhw@mail.gmail.com \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=victor.engmark@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).