All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Milde <daniel@milde.cz>
To: git <git@vger.kernel.org>
Subject: Problems with new location of submodule's GIT_DIR
Date: Fri, 17 Aug 2012 17:28:19 +0200	[thread overview]
Message-ID: <1345217299.7952.83.camel@athena.dnet> (raw)

Hi all,
I have encountered some difficulties with the new location of the
metainformation directory (GIT_DIR) of submodules.

The change of location happened in 1.7.8:

 * When populating a new submodule directory with "git submodule init",
   the $GIT_DIR metainformation directory for submodules is created
inside
   $GIT_DIR/modules/<name>/ directory of the superproject and referenced
   via the gitfile mechanism. This is to make it possible to switch
   between commits in the superproject that has and does not have the
   submodule in the tree without re-cloning.

Which problems it causes:

1) You cannot move submodule easily (change the path to submodule). You
can either remove the submodule and then add it again to different path,
or move the submodule directory and then edit path in its .git, change
path in superproject's .git/modules dir and in .git/config. This is
quite difficult in comparisson with previous behaviour when you can just
move the submodule and then stash changes.

2) This change introduced many difficulties on Windows platform, because
there is limitation to path length and the way how paths are now
composed leads to strange errors when project with submodules is in
user's dir. 

3) Submodules became dependent on superproject. This is quite bad if you
are using submodules a lot (e.g. versioning the whole working space),
because you cannot move or copy them out of the superproject now.

I honestly don't know why this change was introduced because I have
never seen git removing any submodule while walking through the history.
I have seen only the message saying that directory is not empty and so
git will not remove it. Or is there another reason why this change was
added to git?

Thanks

Cheers
Daniel

             reply	other threads:[~2012-08-17 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 15:28 Daniel Milde [this message]
2012-08-17 16:40 ` Problems with new location of submodule's GIT_DIR Jens Lehmann
2012-08-17 17:38   ` Phil Hord

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=1345217299.7952.83.camel@athena.dnet \
    --to=daniel@milde.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.