From: Peter Waller <p@pwaller.net>
To: git@vger.kernel.org
Subject: Masking or hiding directories and files during a git submodule checkout
Date: Fri, 1 Apr 2016 12:56:46 +0100 [thread overview]
Message-ID: <56FE61FE.2020700@pwaller.net> (raw)
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
reply other threads:[~2016-04-01 12:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=56FE61FE.2020700@pwaller.net \
--to=p@pwaller.net \
--cc=git@vger.kernel.org \
/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).