git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Harper <timcharper@gmail.com>
To: git@vger.kernel.org
Subject: Git Submodule hooks someone else may find of use
Date: Thu, 2 Jul 2009 09:20:18 -0600	[thread overview]
Message-ID: <e1a5e9a00907020820i34fb3127r90f29d06619fe64e@mail.gmail.com> (raw)

A while ago I started a thread discussing my desires to have
submodules automatically update when I switch branches or pull.  This
I desired to occur only if my submodule revision conformed with the
pointer recorded in the superproject's previous HEAD.  In other words,
if my submodule showed as "modified", and I switch branches, I would
desire that this "modified" state persist exactly the same way an
uncommitted change would.

I've created a local git hook to support this behavior.  If it
interests you, you may find it here, under
'git-post-checkout-submodules'.

http://github.com/timcharper/git-helpers/tree/master

Installation instructions are found at the top of the script.

Feedback welcome.

Tim

                 reply	other threads:[~2009-07-02 15:20 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=e1a5e9a00907020820i34fb3127r90f29d06619fe64e@mail.gmail.com \
    --to=timcharper@gmail.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).