From: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
To: git@vger.kernel.org
Subject: automatic submodule deinit (platform specific blacklist)
Date: Thu, 17 Apr 2014 10:02:50 +0200 [thread overview]
Message-ID: <2348605.ZgCffZToXK@ws-gergap> (raw)
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
Hi all
in our cross-platform projects we always have a certain Windows-only
submodule, which contains all the compatibility stuff and missing libraries for
Windows.
When cloning such a repository on a Linux machine the typical procedure is:
git clone git@server:project.git
cd project
git submodule init
git submodule deinit path/to/windows-stuff
git submodule update
This way you avoid wasting time and disk space to clone stuff that you don't
need on Linux (or on whatever non-windows machine your are actually working).
It would be really cool to add a kind of platform specific submodule blacklist,
either in .gitconfig or maybe even better in .gitattributes so that we can add
this configuration to the repository.
Example .gitattributes how this could look like:
# common stuff
*.sh eol=lf
*.conf eol=lf
# submodule config
[src/windows-compat]
platforms = win32
By default the platforms could have the value "all". But one can change it to
a list of platform names e.g. "platforms = linux, macosx" or "win32" like in
the example above.
Such a feature would also make it possible to simply use "git clone --
recursive git@server:project.git" avoiding the single stops as shown above.
What do your think? Is something like this possible?
Or is it even possible already somehow?
Today I'm using a shell script to automate this steps, but this is just a
workaround. It would be cool if git itself could do this for us.
--
mit freundlichen Grüßen / best regards
Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG-KeyId: 5AAC50C4
GPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
--
ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 • 91058 Erlangen • Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2014-04-17 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 8:02 Gerhard Gappmeier [this message]
2014-04-17 15:45 ` automatic submodule deinit (platform specific blacklist) Jens Lehmann
2014-04-17 20:11 ` Gerhard Gappmeier
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=2348605.ZgCffZToXK@ws-gergap \
--to=gerhard.gappmeier@ascolab.com \
--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).