Re: RFC: Folder Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
> On Mon, Apr 25, 2011 at 10:52 AM, Jon Seymour <jon.seymour@xxxxxxxxx> wrote:
>> On Mon, Apr 25, 2011 at 6:32 PM, Victor Engmark
>> <victor.engmark@xxxxxxxxx> 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
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]