Re: [PATCH] git-new-workdir: support submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Craig Silverstein <csilvers.mail@xxxxxxxxx> writes:

> The basic problem with submodules, from git-new-workdir's point of
> view, is that instead of having a .git directory, they have a .git
> file with contents `gitdir: <some other path>`.  This is a problem
> because the submodule's config file has an entry like `worktree =
> ../../../khan-exercises` which is relative to "<some other path>"
> rather than to "submodule_dir/.git".
>
> As a result, if we want the new workdir to work properly, it needs to
> keep the same directory structure as the original repository: it
> should also contain a .git file with a 'gitdir', and the actual .git
> contents should be in the place mentioned therein.

Hmmmm, does that mean that the submodule S in the original
repository O's working tree and its checkout in the secondary
working tree W created from O using git-new-workdir share the same
repository location?  More specifically:

	O/.git/                 - original repository
        O/.git/index            - worktree state in O
        O/S                     - submodule S's checkout in O
        O/S/.git                - a gitfile pointing to O/.git/modules/S
	O/.git/modules/S        - submodule S's repository contents
        O/.git/modules/S/config - submodule S's config

	W/.git/                 - secondary working tree
        W/.git/config           - symlink to O/.git/config
        W/.git/index            - worktree state in W (independent of O)
	W/S                     - submodule S's checkout in W (independent of O)
	W/S/.git                - a gitfile pointing to O/.git/modules/S

Doesn't a submodule checkout keep some state tied to the working
tree in its repository configuration file?  Wouldn't this change
introduce problems by sharing O/.git/modules/S/config between the
two checkouts?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]