* Masking or hiding directories and files during a git submodule checkout
@ 2016-04-01 11:56 Peter Waller
0 siblings, 0 replies; only message in thread
From: Peter Waller @ 2016-04-01 11:56 UTC (permalink / raw)
To: git
Hi All,
My constraints are as follows:
* I use submodules to reference other people's code.
* I don't like to have to send commits to those authors of those
submodules, they might not be accepted.
* I don't want to maintain my own fork of the submodule.
* Some submodules may contain lots of stuff I don't want to check out.
* I want other people (and existing tooling, such as `go get`) to be
able to do an ordinary git clone --recursive and not get specific
directories within some submodules checked not.
In my specific use case, I have:
/myfile
/submodule1/directory/nestedsubmodule2
That is, submodule1 itself uses submodules and contains a directory with
nestedsubmodule2.
What I would like to achieve is to be able to specify in my repository
configuration that I don't want anything living in
/submodule1/directory/ to be checked out. But I want to check out
everything else as normal.
Ideally, this would happen automatically during a git clone --recursive,
probably by being specified somewhere such as .gitattributes. I envisage
it this way so that it would work automatically with existing tooling.
* Is this possible now via any means?
* Is this against some fundamental philosophy?
* Is it conceivable that patches would be accepted to make this happen?
Thanks,
- Peter
For further information, this is a follow on from a mega-thread about
vendoring packages in go [*]. I'm seeking a minimal solution where
little additional tooling is required, and this is just one avenue I'm
pursuing. One such solution (considered in this email) could be to avoid
checking out specific directories which live in submodules. Of course if
it requires changes to git, I'd have to wait for it to update before I
can use that feature, but I'm OK with that, so long as we have a
solution which works eventually.
[*] https://groups.google.com/d/topic/golang-nuts/AnMr9NL6dtc/discussion
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-01 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-01 11:56 Masking or hiding directories and files during a git submodule checkout Peter Waller
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).