Review Request: Git support: take care of submodule directories when committing non-recursively (the latter is the default&fixed behavior).
Ivan Shapovalov
intelfx100 at gmail.com
Sun Nov 11 08:49:34 UTC 2012
> On Nov. 11, 2012, 8:35 a.m., Andreas Pakulat wrote:
> > I think I don't quite understand what the intention is here. Are you trying to make a one-step process out of the usual two-step process of comitting changes to a submodule and changing the parent module to include the new submodule changes? I think thats wrong at least in the general case. Of course there are cases where submodules are solely used to assemble several repositories in a meta-project, but its also possible to have submodules to include their code in the parent process. In such cases the commits in parent and sub-module have different messages and thus should be handled separately in KDevelop as well.
No. Committing to submodule's codebase is a different thing. This review is about changing the submodule's revision and recording these changes in a parent project.
$ cd Submodule
$ git pull origin
$ cd ..
$ git commit -m "Update the Submodule's checkout" -- Submodule
KDevelop won't allow you to do the last step via GUI because it will do literally the following:
> git commit -m "Update the Submodule's checkout" -- Submodule/*
...And this is going to fail because the parent repo knows nothing about "Submodule/*". This patch fixes it and nothing else.
- Ivan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107115/#review21806
-----------------------------------------------------------
On Oct. 29, 2012, 3:06 p.m., Ivan Shapovalov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107115/
> -----------------------------------------------------------
>
> (Updated Oct. 29, 2012, 3:06 p.m.)
>
>
> Review request for KDevelop.
>
>
> Description
> -------
>
> Non-recursive operations in Git are handled by replacing a directory URL with URLs of all files (not directories) inside the given directory.
> This is wrong when a change to a submodule directory (man git-submodule) is involved in commit. Actually, it does not make sense to "commit" all files inside the submodule directory as they are not a part of the parent repository.
> And, actually, the commits are non-recursive by default (this is hardcoded) - so submodules can't be committed via GUI for now.
>
> So, take list of all submodules in the repository and walk the source URL list copying all submodule items into the target list verbatim prior to invoking the directory->files expansion on the source list.
>
>
> Diffs
> -----
>
> plugins/git/gitplugin.h 1d13c5c
> plugins/git/gitplugin.cpp 56efe2f
>
> Diff: http://git.reviewboard.kde.org/r/107115/diff/
>
>
> Testing
> -------
>
> Existing unit-tests and manual testing.
>
>
> Thanks,
>
> Ivan Shapovalov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121111/db025127/attachment.html>
More information about the KDevelop-devel
mailing list