Re: Mixing and matching multiple projects

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

 



In message <7vhayptght.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>, Junio C Hamano writes:

        /s/xyzzy/.git       -- the superproject
        /s/xyzzy/os/.git    -- the "os" submodule
        /s/xyzzy/u/.git     -- the "userspace" submodule

    At the working tree level, he can add /s/xyzzy/os/drivers/frotz/ directory
    and populate its sources there. Everything else is already set up to build
    and link to it properly. But how would he add that directory to git?

    But I wonder if we can do without forking the /s/xyzzy/os/.git submodule?

    I am wondering if people who have used submodules and/or nested
    projects more than I have better solutions to this puzzle.

Using gitslave [http://gitslave.sf.net] instead of git-submodules, you
can *almost* get there.

Specifically, gitslave allows the superproject /s/xyzzy to attach a
subproject at /s/xyzzy/os/drivers/frotz (either recursively through
/os which you don't want to do or directly).

However, the problem is the .gitignore in the os subproject.  If we
didn't have some way to ignore drivers/frotz, various git commands
would get annoyed.  Adding it in the os subproject requires forking
which you said you didn't want to do.  However, you could use
core.excludesfile in the os subproject to ignore the necessary file.

gitslave doesn't support automatically using core.excludesfile (and
indeed would automatically make an entry in os/.gitignore when you set
up the hierarchy).  However, it isn't a lot of work to revert that
.gitignore commit and set up core.excludesfile; but setting up
core.excludesfile on every clone might get annoying.  It probably
wouldn't be too difficult to tearch gitslave how to do that
automagically.

Is using this third party tool and making the necessary changes or
manually doing the work after every clone worth it?  Do you need the
git-submodule semantics of freezing the subprojects at a particular
SHA instead of floating at the tip of a branch?  Are the branches used
between xyzzy and os desynchronized?  Only you can judge.  Actually it
seems possible that you could use gitslave for os/drivers/frotz and
git-submodules for os.  Whether that is wise…

I would be open to moving gitslave into contrib similar to what
git-subtree is under the process of doing, but gitslave would
certainly need some cleanup since it grew rather organically.

					-Seth Robertson
--
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]