git-remote-testgit: only push for non-local repositories

Trying to push for local repositories will fail since there is no local checkout in .git/info/... to push from as that is only used for non-local repositories (local repositories are pushed to directly). This went unnoticed because the transport helper infrastructure does not check the return value of the helper. Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sverre Rabbelier committed Jul 16, 2011 at 15:03 UTC 0fb56ce716090248ed4895aff69dd3953b00882f
1 file changed +3 -1
git-remote-testgit.py
+3 -1
@@ -146,7 +146,9 @@ def do_export(repo, args):
146
147 update_local_repo(repo)
148 repo.importer.do_import(repo.gitdir)
149 - repo.non_local.push(repo.gitdir)
149 +
150 + if not repo.local:
151 + repo.non_local.push(repo.gitdir)
152
153
154 COMMANDS = {