{"thread":{"id":"21516","subject":"Helpers scripts to simplify work with submodules (git-sm-commit and git-sm-pull)","startedAt":"2009-11-07T13:05:53Z","lastAt":"2009-11-07T13:05:53Z","messageCount":1,"participants":["Pavel Pisa"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127041","messageId":"200911071405.53530.pisa@cmp.felk.cvut.cz","threadId":"21516","inReplyTo":null,"subject":"Helpers scripts to simplify work with submodules (git-sm-commit and git-sm-pull)","fromName":"Pavel Pisa","fromEmail":"pisa@cmp.felk.cvut.cz","sentAt":"2009-11-07T13:05:53Z","receivedAt":"2009-11-07T13:05:53Z","isPatch":false,"sender":{"key":"pisa@cmp.felk.cvut.cz","avatar":null},"body":"Hello to all git developers and users,\n\nwe are dropping use of other SCMs for most of our projects\nduring time and switch to GIT. The actual one is uLan protocol\nrelated stuff\n\n  http://sourceforge.net/projects/ulan/develop\n  git://ulan.git.sourceforge.net/gitroot/ulan/ulan\n\nThis project provided more libraries and targets support used\nin other university and company projects. CVS allows to checkout\nsome subset/directory for use in such case. The GIT does not\nsupport work with subtrees so we have split project into\nmultiple submodules, but actual GIT submodules support\nmakes committing and maintenance over whole tree a little painfull.\n\nSo there are hackish helper scripts which made us work simpler\nand can be found usable by others as well\n\ngit-sm-pull - runs git pull (by default) or other option or shell specified \ncommand\nfor all subprojects. It is not necessary to stay in the project top directory,\nwhen invoked. If it can be instructed to work with top lever repository even\nif current working directory is inside subproject directory if option -w\nis specified.\n\nhttp://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan-top;a=blob;f=scripts/git-sm-pull;hb=HEAD\n\nUsage: git-sm-pull [options] [shell command]\n      -w --whole      find top repository for whole project\n      -h --help       help\n      -p --pull       pull in all submodules\n      -P --push       push in all submodules\n      -s --status     status in all submodules\n\ngit-sm-pull - runs git gui (by default) or other option or shell specified \ncommand\nfor all subproject where status reports that repository is not clean.\n\nhttp://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan-top;a=blob;f=scripts/git-sm-commit;hb=HEAD\n\nUsage: git-sm-commit [options] [shell command]\n      -h --help       help\n      -w --whole      find top repository for whole project\n      -m --message    specify commit message on command line\n      -a --all        commit all changes in tracked files\n      -s --status     show status\n\nThe second stript can be used without parameters or with -w to do\nselect and commit changes interactively or if option -m and/or -a\nare used int runs git commit. You can find quite strange trickeries\nthere to propagate correctly multiple word arguments through shell/bash\nthere so it works as expected.\n\n  git-sm-commit                    -> invokes GUI for modified submodules\n                                      and for top finally\n  git-sm-commit -a -m \"my change\"  -> commits changes in all tracked files\n                                      in all submodules with provided message\n                                      and then does toplevel commit which\n                                      should ensure submodules versions tying\n  git-sm-commit qgit               -> runs know fancy viewer for each modified\n                                      submodule and for top finally\n  \nThe other git commands can be specified as well, so git-sm-commit\ncan be little misleading after script evolution from original single\npurpose version, but commit preparation is it main use still.\n\nThanks for git and may it be that these scripts can be usable\nfor some other users,\n\n                Pavel Pisa\n    e-mail:     pisa@cmp.felk.cvut.cz\n    www:        http://cmp.felk.cvut.cz/~pisa\n    university: http://dce.felk.cvut.cz/\n    company:    http://www.pikron.com/\n"}]}