git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: git@vger.kernel.org
Subject: Re: Auto update submodules after merge and reset
Date: Tue, 06 Dec 2011 22:32:04 +0100	[thread overview]
Message-ID: <4EDE89D4.7040001@web.de> (raw)
In-Reply-To: <4EDD6A8C.40008@qualcomm.com>

Am 06.12.2011 02:06, schrieb Max Krasnyansky:
> On 11/30/2011 12:31 AM, Jens Lehmann wrote:
>> I'm working on a patch series to teach Git to optionally update the submodules work trees on checkout, reset merge and so on, but I'm not there yet.

> Everything you suggested sounds great. We're on the same page (config option, etc).
> How far along are you? Do you have a tree I could pull from to play with things?
> I could help with testing, bug fixes and/or implementing parts of it. Let me know.

Great to hear that! Please see my GitHub repo for the current state:
https://github.com/jlehmann/git-submod-enhancements

It has two interesting branches:

git-checkout-recurse-submodules:
This was my first attempt to tell unpack_trees() to checkout submodules
and works quite well. Porcelain checks out submodules by default while
plumbing learned the --recurse-submodules option to do that (and git gui
and gitk use that option so stuff like "Revert Changes" does work on
submodules :-). I use it at work for some time and it works quite well,
but doesn't handle new or deleted submodules. And unfortunately the way
I added the flag to control submodule checkout doesn't allow to add a
per-submodule configuration option.

recursive_submodule_checkout:
This is where new development happens. I added the basic infrastructure
to have global and per-submodule configuration controlling the checkout
and ported the unpack_trees() changes from git-checkout-recurse-submodules
here. I also added removal and creation of submodules based on the now
moved gitdir. This branch has rudimentary tests but still needs quite some
work.

I expect to have some time around the end of year to move things forward.
It'd be cool if you could check the current state, after that we can
decide how to move the topic forward together.

> For now I implemented automatic submodules update using 'post-merge' hook. But obviously it does
> not handle reset and things. I'm thinking of adding 'post-reset' and 'pre-merge' that would be useful
> for this and maybe other things.

I doubt hooks can be more than a band aid for submodule checkout. I thought
about doing that too and came to the conclusion it will only handle some of
the issues. And you'll have to provide a real life use case to get a new
hook accepted ;-)

  reply	other threads:[~2011-12-06 21:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30  0:55 Auto update submodules after merge and reset Max Krasnyansky
2011-11-30  8:31 ` Jens Lehmann
2011-12-06  1:06   ` Max Krasnyansky
2011-12-06 21:32     ` Jens Lehmann [this message]
2011-12-07  9:07   ` Andreas T.Auer
2011-12-07 22:23     ` Jens Lehmann
2011-12-08  9:13       ` andreas.t.auer_gtml_37453
2011-12-09 23:57         ` Phil Hord
2011-12-10  1:41           ` Andreas T.Auer
2011-12-11 14:43             ` Phil Hord
2011-12-11 21:15           ` Andreas T.Auer
2011-12-12 22:39             ` Jens Lehmann
2011-12-12 23:43               ` Phil Hord
2011-12-13  7:52                 ` Jens Lehmann
2011-12-13  9:45               ` Andreas T.Auer
2011-12-13 21:44                 ` Jens Lehmann
2011-12-13 23:05                   ` Andreas T.Auer
2011-12-14 15:16                     ` Marc Branchaud

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=4EDE89D4.7040001@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    /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).