Re: Re: Re: Relative submodule URLs
- From
Heiko Voigt <hvoigt@hvoigt.net>
- Date
- Aug 21, 2014, 12:37 UTC
- Message-ID
- <20140821123705.GA68456@book.hvoigt.net>
- In-Reply-To
- <CAHd499C2F2s51qmfwS5VxLvP-O2Wjdb6-yfj+T9tMkZz7ohVXQ@mail.gmail.com>
On Wed, Aug 20, 2014 at 08:18:12AM -0500, Robert Dailey wrote:
Show 25 quoted lines
> On Tue, Aug 19, 2014 at 3:57 PM, Heiko Voigt <hvoigt@hvoigt.net> wrote: > > I would actually error out when specified in already cloned state. > > Because otherwise the user might expect the remote to be updated. > > > > Since we are currently busy implementing recursive fetch and checkout I have > > added that to our ideas list[1] so we do not forget about it. > > > > In the meantime you can either use the branch.<name>.remote > > configuration to define a remote to use or just use 'origin'. > > > > Cheers Heiko > > > > [1] https://github.com/jlehmann/git-submod-enhancements/wiki#add-with-remote--switch-to-submodule-update > > Thanks Heiko. > > I would offer to help implement this for you, if you find it to be a > good idea, but I've never done git development before and based on > what I've seen it seems like you need to know at least 2-3 languages > to contribute: bash, perl, C++. I know C++ & Python but I don't know > perl or bash scripting language. > > What would it take to help you guys out? It's easy to complain & file > bugs but as a developer I feel like I should offer more, if it suits > you.
For this particular case shell scripting should be sufficient. And it should not take too much time. Have a look at the git-submodule.sh script in the repository. That is the one implementing the git submodule command.
Additionally you need to extend the documentation and write a test or two. Writing a test is also done in shell script. The documentation[1] is in asciidoc which is pretty self explanatory.
The test should probably go into t/t7406-submodule-update.sh and, as Phil pointed out, in t7403-submodule-sync.sh).
Also make sure to read the shell scripting part in Documentation/CodingGuidelines and as a general rule: Keep close to the style you find in the file. And when you are ready to send a patch: Documentation/SubmittingPatches.
If you are happy but unsure about anything just send a patch with your implementation (CC me and everyone involved) and we will discuss it here on the list.
Cheers Heiko
[1] Documentation/git-submodule.txt