Skip to content

Commit

Permalink
git-remote-testgit: only push for non-local repositories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sverre Rabbelier authored and Junio C Hamano committed Jul 19, 2011
1 parent 1843f0c commit 0fb56ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-remote-testgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ def do_export(repo, args):

update_local_repo(repo)
repo.importer.do_import(repo.gitdir)
repo.non_local.push(repo.gitdir)

if not repo.local:
repo.non_local.push(repo.gitdir)


COMMANDS = {
Expand Down

0 comments on commit 0fb56ce

Please sign in to comment.