git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [WIP PATCH 0/4] Recursively checkout submodules
Date: Fri, 09 Apr 2010 23:34:39 +0200	[thread overview]
Message-ID: <4BBF9D6F.2000006@web.de> (raw)

Having found some Git time recently i started to tackle the next
major issue on my agenda to improve submodule experience: Check
out the matching versions of populated submodules when doing a
checkout in the superproject (without having to do an explicit
"git submodule update").

So here is what i came up with so far: The first two patches lay
the groundwork by introducing a new function checkout_submodule()
in submodule.c and calling it from checkout_entry(). The new
"ignore_submodules" flags added to "struct checkout" and "struct
unpack_trees_options" can be used to prevent that (and default
to true, which is the old behavior then changed by the following
patches). The next two patches teach "git checkout" and "git
checkout-index" to default to checking out submodules too unless
the new option "--ignore-subodules" is used.

What's working:
* Changing branches and specific revisions update the submodules
  accordingly
* "Revert changes" in "git gui" resets submodules now

What's missing:
* Test cases
* I think "git fetch" should recurse into populated submodules
  too, otherwise the commits to check out there might be missing


Opinions?


Jens Lehmann (4):
  Prepare checkout_entry() for recursive checkout of submodules
  Add "ignore_submodules" member to "struct unpack_trees_options"
  Teach checkout to recursively checkout submodules
  Teach checkout-index to recursively checkout submodules

 Documentation/git-checkout-index.txt |    9 ++++++++-
 Documentation/git-checkout.txt       |    7 +++++++
 archive.c                            |    1 +
 builtin/apply.c                      |    1 +
 builtin/checkout-index.c             |    5 ++++-
 builtin/checkout.c                   |    6 ++++++
 builtin/clone.c                      |    1 +
 builtin/commit.c                     |    1 +
 builtin/merge.c                      |    2 ++
 builtin/read-tree.c                  |    1 +
 builtin/reset.c                      |    1 +
 cache.h                              |    3 ++-
 diff-lib.c                           |    2 ++
 entry.c                              |    9 ++++++---
 merge-recursive.c                    |    1 +
 submodule.c                          |   32 ++++++++++++++++++++++++++++++++
 submodule.h                          |    1 +
 t/t2013-checkout-submodule.sh        |   14 ++++++++++++--
 unpack-trees.c                       |    1 +
 unpack-trees.h                       |    3 ++-
 20 files changed, 92 insertions(+), 9 deletions(-)

             reply	other threads:[~2010-04-09 21:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09 21:34 Jens Lehmann [this message]
2010-04-09 21:36 ` [WIP PATCH 1/4] Prepare checkout_entry() for recursive checkout of submodules Jens Lehmann
2010-04-09 21:59   ` Junio C Hamano
2010-04-09 23:11     ` Jens Lehmann
2010-04-10 17:01       ` Jens Lehmann
2010-04-10 18:44         ` Junio C Hamano
2010-04-10 20:57           ` Jens Lehmann
2010-04-09 21:37 ` [WIP PATCH 2/4] Add "ignore_submodules" member to "struct unpack_trees_options" Jens Lehmann
2010-04-09 21:39 ` [WIP PATCH 3/4] Teach checkout to recursively checkout submodules Jens Lehmann
2010-04-09 21:40 ` [WIP PATCH 4/4] Teach checkout-index " Jens Lehmann
2010-04-09 22:04   ` Junio C Hamano
2010-04-09 23:22     ` Jens Lehmann
2010-04-10  5:07 ` [WIP PATCH 0/4] Recursively " Junio C Hamano

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=4BBF9D6F.2000006@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).