]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0060-path-utils.sh
submodule: port resolve_relative_url from shell to C
authorStefan Beller <sbeller@google.com>
Sat, 16 Apr 2016 00:50:12 +0000 (17:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Apr 2016 06:44:01 +0000 (23:44 -0700)
commit63e95beb085ce8ae359d728ec0a54c3dcfe741f5
treefc12b77136c436375119b867f0d24b4e5e50fca9
parentee30f17805f51d372ff9c5036f1d142c167e5e34
submodule: port resolve_relative_url from shell to C

Later on we want to automatically call `git submodule init` from
other commands, such that the users don't have to initialize the
submodule themselves.  As these other commands are written in C
already, we'd need the init functionality in C, too.  The
`resolve_relative_url` function is a large part of that init
functionality, so start by porting this function to C.

To create the tests in t0060, the function `resolve_relative_url`
was temporarily enhanced to write all inputs and output to disk
when running the test suite. The added tests in this patch are
a small selection thereof.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh
t/t0060-path-utils.sh