{"thread":{"id":"36431","subject":"automatic submodule deinit (platform specific blacklist)","startedAt":"2014-04-17T08:02:50Z","lastAt":"2014-04-17T20:11:24Z","messageCount":3,"participants":["Gerhard Gappmeier","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"239011","messageId":"2348605.ZgCffZToXK@ws-gergap","threadId":"36431","inReplyTo":null,"subject":"automatic submodule deinit (platform specific blacklist)","fromName":"Gerhard Gappmeier","fromEmail":"gerhard.gappmeier@ascolab.com","sentAt":"2014-04-17T08:02:50Z","receivedAt":"2014-04-17T08:02:50Z","isPatch":false,"sender":{"key":"gerhard.gappmeier@ascolab.com","avatar":"https://gravatar.com/avatar/5b63eaa6f5ab8e059a28e3b70981e3088c9272b16489e49bce896b1f773ca43d?d=mp&s=160"},"body":"Hi all\n\nin our cross-platform projects we always have a certain Windows-only \nsubmodule, which contains all the compatibility stuff and missing libraries for \nWindows.\n\nWhen cloning such a repository on a Linux machine the typical procedure is:\ngit clone git@server:project.git\ncd project\ngit submodule init\ngit submodule deinit path/to/windows-stuff\ngit submodule update\n\nThis way you avoid wasting time and disk space to clone stuff that you don't \nneed on Linux (or on whatever non-windows machine your are actually working).\n\nIt would be really cool to add a kind of platform specific submodule blacklist,\neither in .gitconfig or maybe even better in .gitattributes so that we can add \nthis configuration to the repository.\n\nExample .gitattributes how this could look like:\n  # common stuff\n  *.sh eol=lf\n  *.conf eol=lf\n\n  # submodule config\n  [src/windows-compat]\n  platforms = win32\n\nBy default the platforms could have the value \"all\". But one can change it to \na list of platform names e.g. \"platforms = linux, macosx\" or \"win32\" like in \nthe example above.\n\nSuch a feature would also make it possible to simply use \"git clone --\nrecursive git@server:project.git\" avoiding the single stops as shown above.\n\nWhat do your think? Is something like this possible?\nOr is it even possible already somehow?\n\nToday I'm using a shell script to automate this steps, but this is just a \nworkaround. It would be cool if git itself could do this for us.\n\n-- \nmit freundlichen Grüßen / best regards\n\nGerhard Gappmeier\nascolab GmbH - automation systems communication laboratory\nTel.: +49 9131 691 123\nFax: +49 9131 691 128\nWeb: http://www.ascolab.com\nGPG-KeyId: 5AAC50C4\nGPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4\n\n--\nascolab GmbH\nGeschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß\nSitz der Gesellschaft: Am Weichselgarten 7 • 91058 Erlangen • Germany\nRegisternummer: HRB 9360\nRegistergericht: Amtsgericht Fürth"},{"id":"239017","messageId":"534FF724.9060707@web.de","threadId":"36431","inReplyTo":"2348605.ZgCffZToXK@ws-gergap","subject":"Re: automatic submodule deinit (platform specific blacklist)","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2014-04-17T15:45:40Z","receivedAt":"2014-04-17T15:45:40Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 17.04.2014 10:02, schrieb Gerhard Gappmeier:\n> Hi all\n> \n> in our cross-platform projects we always have a certain Windows-only \n> submodule, which contains all the compatibility stuff and missing libraries for \n> Windows.\n> \n> When cloning such a repository on a Linux machine the typical procedure is:\n> git clone git@server:project.git\n> cd project\n> git submodule init\n> git submodule deinit path/to/windows-stuff\n> git submodule update\n> \n> This way you avoid wasting time and disk space to clone stuff that you don't \n> need on Linux (or on whatever non-windows machine your are actually working).\n> \n> It would be really cool to add a kind of platform specific submodule blacklist,\n> either in .gitconfig or maybe even better in .gitattributes so that we can add \n> this configuration to the repository.\n> \n> Example .gitattributes how this could look like:\n>   # common stuff\n>   *.sh eol=lf\n>   *.conf eol=lf\n> \n>   # submodule config\n>   [src/windows-compat]\n>   platforms = win32\n> \n> By default the platforms could have the value \"all\". But one can change it to \n> a list of platform names e.g. \"platforms = linux, macosx\" or \"win32\" like in \n> the example above.\n> \n> Such a feature would also make it possible to simply use \"git clone --\n> recursive git@server:project.git\" avoiding the single stops as shown above.\n> \n> What do your think? Is something like this possible?\n> Or is it even possible already somehow?\n> \n> Today I'm using a shell script to automate this steps, but this is just a \n> workaround. It would be cool if git itself could do this for us.\n\nWhat about setting \"submodule.<name>.update\" to \"none\" in the config of\nyour non-Windows machines? Then they would be initialized (= the URL\nsetting gets copied to .git/config) but never checked out.\n"},{"id":"239047","messageId":"5350356C.3030508@ascolab.com","threadId":"36431","inReplyTo":"534FF724.9060707@web.de","subject":"Re: automatic submodule deinit (platform specific blacklist)","fromName":"Gerhard Gappmeier","fromEmail":"gerhard.gappmeier@ascolab.com","sentAt":"2014-04-17T20:11:24Z","receivedAt":"2014-04-17T20:11:24Z","isPatch":false,"sender":{"key":"gerhard.gappmeier@ascolab.com","avatar":"https://gravatar.com/avatar/5b63eaa6f5ab8e059a28e3b70981e3088c9272b16489e49bce896b1f773ca43d?d=mp&s=160"},"body":"On 04/17/14 17:45, Jens Lehmann wrote:\n> Am 17.04.2014 10:02, schrieb Gerhard Gappmeier:\n>> Hi all\n>>\n>> in our cross-platform projects we always have a certain Windows-only\n>> submodule, which contains all the compatibility stuff and missing libraries for\n>> Windows.\n>>\n>> When cloning such a repository on a Linux machine the typical procedure is:\n>> git clone git@server:project.git\n>> cd project\n>> git submodule init\n>> git submodule deinit path/to/windows-stuff\n>> git submodule update\n>>\n>> This way you avoid wasting time and disk space to clone stuff that you don't\n>> need on Linux (or on whatever non-windows machine your are actually working).\n>>\n>> It would be really cool to add a kind of platform specific submodule blacklist,\n>> either in .gitconfig or maybe even better in .gitattributes so that we can add\n>> this configuration to the repository.\n>>\n>> Example .gitattributes how this could look like:\n>>    # common stuff\n>>    *.sh eol=lf\n>>    *.conf eol=lf\n>>\n>>    # submodule config\n>>    [src/windows-compat]\n>>    platforms = win32\n>>\n>> By default the platforms could have the value \"all\". But one can change it to\n>> a list of platform names e.g. \"platforms = linux, macosx\" or \"win32\" like in\n>> the example above.\n>>\n>> Such a feature would also make it possible to simply use \"git clone --\n>> recursive git@server:project.git\" avoiding the single stops as shown above.\n>>\n>> What do your think? Is something like this possible?\n>> Or is it even possible already somehow?\n>>\n>> Today I'm using a shell script to automate this steps, but this is just a\n>> workaround. It would be cool if git itself could do this for us.\n> What about setting \"submodule.<name>.update\" to \"none\" in the config of\n> your non-Windows machines? Then they would be initialized (= the URL\n> setting gets copied to .git/config) but never checked out.\ngreat! that works.\n\nIt would be even better if we could store this config in the repository,\nbut this helps already a lot.\n\nthx\n"}]}