Git development
 help / color / mirror / Atom feed
From: Pavel Pisa <pisa@cmp.felk.cvut.cz>
To: git@vger.kernel.org
Cc: Michal Sojka <sojkam1@fel.cvut.cz>
Subject: Helpers scripts to simplify work with submodules (git-sm-commit and git-sm-pull)
Date: Sat, 7 Nov 2009 14:05:53 +0100	[thread overview]
Message-ID: <200911071405.53530.pisa@cmp.felk.cvut.cz> (raw)

Hello to all git developers and users,

we are dropping use of other SCMs for most of our projects
during time and switch to GIT. The actual one is uLan protocol
related stuff

  http://sourceforge.net/projects/ulan/develop
  git://ulan.git.sourceforge.net/gitroot/ulan/ulan

This project provided more libraries and targets support used
in other university and company projects. CVS allows to checkout
some subset/directory for use in such case. The GIT does not
support work with subtrees so we have split project into
multiple submodules, but actual GIT submodules support
makes committing and maintenance over whole tree a little painfull.

So there are hackish helper scripts which made us work simpler
and can be found usable by others as well

git-sm-pull - runs git pull (by default) or other option or shell specified 
command
for all subprojects. It is not necessary to stay in the project top directory,
when invoked. If it can be instructed to work with top lever repository even
if current working directory is inside subproject directory if option -w
is specified.

http://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan-top;a=blob;f=scripts/git-sm-pull;hb=HEAD

Usage: git-sm-pull [options] [shell command]
      -w --whole      find top repository for whole project
      -h --help       help
      -p --pull       pull in all submodules
      -P --push       push in all submodules
      -s --status     status in all submodules

git-sm-pull - runs git gui (by default) or other option or shell specified 
command
for all subproject where status reports that repository is not clean.

http://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan-top;a=blob;f=scripts/git-sm-commit;hb=HEAD

Usage: git-sm-commit [options] [shell command]
      -h --help       help
      -w --whole      find top repository for whole project
      -m --message    specify commit message on command line
      -a --all        commit all changes in tracked files
      -s --status     show status

The second stript can be used without parameters or with -w to do
select and commit changes interactively or if option -m and/or -a
are used int runs git commit. You can find quite strange trickeries
there to propagate correctly multiple word arguments through shell/bash
there so it works as expected.

  git-sm-commit                    -> invokes GUI for modified submodules
                                      and for top finally
  git-sm-commit -a -m "my change"  -> commits changes in all tracked files
                                      in all submodules with provided message
                                      and then does toplevel commit which
                                      should ensure submodules versions tying
  git-sm-commit qgit               -> runs know fancy viewer for each modified
                                      submodule and for top finally
  
The other git commands can be specified as well, so git-sm-commit
can be little misleading after script evolution from original single
purpose version, but commit preparation is it main use still.

Thanks for git and may it be that these scripts can be usable
for some other users,

                Pavel Pisa
    e-mail:     pisa@cmp.felk.cvut.cz
    www:        http://cmp.felk.cvut.cz/~pisa
    university: http://dce.felk.cvut.cz/
    company:    http://www.pikron.com/

                 reply	other threads:[~2009-11-07 13:29 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=200911071405.53530.pisa@cmp.felk.cvut.cz \
    --to=pisa@cmp.felk.cvut.cz \
    --cc=git@vger.kernel.org \
    --cc=sojkam1@fel.cvut.cz \
    /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