Skip to content

Commit 6373336

Browse files
felipecgitster
authored andcommitted
remote-hg: fix new branch creation
When a user creates a new branch with git: % git checkout -b branches/devel and then pushes this branch % git push origin branches/devel which is the way to push new mercurial branches, we do want to create a branch, but the command would fail without newbranch=True. This only matters when force_push=False, but setting newbranch=True unconditionally does not hurt. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 760ee1c commit 6373336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/remote-helpers/git-remote-hg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def do_export(parser):
856856
continue
857857

858858
if peer:
859-
parser.repo.push(peer, force=force_push)
859+
parser.repo.push(peer, force=force_push, newbranch=True)
860860

861861
# handle bookmarks
862862
for bmark, node in p_bmarks:

0 commit comments

Comments
 (0)