Skip to content

Commit

Permalink
git_remote_helpers: push all refs during a non-local export
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jul 19, 2011
1 parent 3ea7d09 commit b4b8729
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git_remote_helpers/git/non_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def push(self, base):
if not os.path.exists(path):
die("could not find repo at %s", path)

args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath]
args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath, "--all"]
child = subprocess.Popen(args)
if child.wait() != 0:
raise CalledProcessError
2 changes: 1 addition & 1 deletion t/t5800-remote-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ test_expect_success 'push when remote has extra refs' '
compare_refs clone master server master
'

test_expect_failure 'push new branch by name' '
test_expect_success 'push new branch by name' '
(cd clone &&
git checkout -b new-name &&
echo content >>file &&
Expand Down

0 comments on commit b4b8729

Please sign in to comment.