1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 23:36:32 +02:00

Fix config key miscount in url.*.insteadOf

Also tighten test to require it to be correct.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Daniel Barkalow 2008-04-12 15:32:00 -04:00 committed by Junio C Hamano
parent d6d96f835c
commit 60e3aba9c3
2 changed files with 5 additions and 5 deletions

View File

@ -315,7 +315,7 @@ static int handle_config(const char *key, const char *value)
}
if (!prefixcmp(key, "url.")) {
struct rewrite *rewrite;
name = key + 5;
name = key + 4;
subkey = strrchr(name, '.');
if (!subkey)
return 0;

View File

@ -103,9 +103,9 @@ test_expect_success 'fetch with wildcard' '
test_expect_success 'fetch with insteadOf' '
mk_empty &&
(
TRASH=$(pwd) &&
TRASH=$(pwd)/ &&
cd testrepo &&
git config url./$TRASH/.insteadOf trash/
git config url.$TRASH.insteadOf trash/
git config remote.up.url trash/. &&
git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
git fetch up &&
@ -145,8 +145,8 @@ test_expect_success 'push with wildcard' '
test_expect_success 'push with insteadOf' '
mk_empty &&
TRASH=$(pwd) &&
git config url./$TRASH/.insteadOf trash/ &&
TRASH=$(pwd)/ &&
git config url.$TRASH.insteadOf trash/ &&
git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&