From: Daniel Barkalow Date: Sat, 12 Apr 2008 19:32:00 +0000 (-0400) Subject: Fix config key miscount in url.*.insteadOf X-Git-Tag: v1.5.5.1~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=60e3aba9c3c99c40826c051d384e785935874962;p=git.git Fix config key miscount in url.*.insteadOf Also tighten test to require it to be correct. Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- diff --git a/remote.c b/remote.c index 08af7f9de..369dc3398 100644 --- a/remote.c +++ b/remote.c @@ -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; diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 793ffc660..6d7e73854 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -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 &&