Skip to content

Commit 0fb56ce

Browse files
SRabbeliergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1843f0c commit 0fb56ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-remote-testgit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ def do_export(repo, args):
146146

147147
update_local_repo(repo)
148148
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)
150152

151153

152154
COMMANDS = {

0 commit comments

Comments
 (0)