Skip to content

Commit b4b8729

Browse files
peffgitster
authored andcommitted
git_remote_helpers: push all refs during a non-local export
When a remote helper exports to a non-local git repo, the steps are roughly: 1. fast-export into a local staging area; the set of interesting refs is defined by what is in the fast-export stream 2. git push from the staging area to the non-local repo In the second step, we should explicitly push all refs, not just matching ones. This will let us push refs that do not yet exist in the remote repo. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Sverre Rabbelier <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ea7d09 commit b4b8729

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git_remote_helpers/git/non_local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def push(self, base):
6363
if not os.path.exists(path):
6464
die("could not find repo at %s", path)
6565

66-
args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath]
66+
args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath, "--all"]
6767
child = subprocess.Popen(args)
6868
if child.wait() != 0:
6969
raise CalledProcessError

t/t5800-remote-helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ test_expect_success 'push when remote has extra refs' '
115115
compare_refs clone master server master
116116
'
117117

118-
test_expect_failure 'push new branch by name' '
118+
test_expect_success 'push new branch by name' '
119119
(cd clone &&
120120
git checkout -b new-name &&
121121
echo content >>file &&

0 commit comments

Comments
 (0)