Re: Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules)

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

 



On 4/30/08, Tim Harper <timcharper@xxxxxxxxx> wrote:
> > What about the following case:
> > - submodule matches the super module checkin
> > - make changes to submodule but to *not* commit them
> > - switch supermodule branches, which should checkout a different submodule
> > - submodule checkout causes a conflict with uncommitted files
> > [all of the above were meant to be steps in the same test case]
>
> Oooh - this could be a problem currently, especially if you're not on a
> branch.  If you have to resolve conflicts the way to resolve them is to
> commit, and you can't switch to a branch to commit unless you resolve your
> issues.  In which case, you'll probably want to resolve, commit, then create
> a new branch with your current HEAD, then merge it into a branch.  I'll
> visit that as issues arise.  This is bleeding edge experimentation here :)

I know how to deal with it manually, but I'm more concerned about what
would happen in the automatic case, that is, the submodule is dirty
and the supermodule tries to switch branches.

I guess the standard thing to do would be to just have git-checkout in
the supermodule check all the submodules first, and if any of them are
dirty, refuse to do anything at all.

>  Here's a link to the bundle.  It's written in ruby.:
>  http://github.com/timcharper/git-tmbundle/
>
> What does it have to do with submodules?  It's essentially a "GUI" for git.
> It provides automation for a lot of common tasks also.  My team has a need
> for submodules, but unfortunately in their current state I couldn't
> recommend it to them, so I "smoothed over" the rough edges by automating a
> lot of the awkwardness.  So far, it's been working well for us.

Hmm, so the bad news is that it doesn't really help me then :(

It would be awesome if you could turn the fancy behaviour of this
bundle into patches to git-submodule, for example, and then have your
textmate macros call the modified git-submodule.  It might be a bit of
an uphill battle to get the patches accepted into the release, but I
think it's worth the effort, as git-submodule in its current state is
just a non-starter for my group at least.

Have fun,

Avery
--
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]

  Powered by Linux