Skip to content

jj git push ignores multiple push urls #4889

@seankhliao

Description

@seankhliao

Description

Steps to Reproduce the Problem

  1. git init
  2. git remote add origin https://example.com/upstream
  3. git remote set-url --add --push origin https://example.com/upstream
  4. git remote set-url --add --push origin https://example.com/mirror

verify the git config:

# .git/config
[remote "origin"]
	url = https://example.com/upstream
	fetch = +refs/heads/*:refs/remotes/origin/*
	pushurl = https://example.com/upstream
	pushurl = https://example.com/mirror
  1. jj git init --colocate
  2. make commits
  3. jj bookmark set main -r @-
  4. jj git push -b main

Expected Behavior

Like git, pushes changes to both urls.

Actual Behavior

Only pushes to the last defined pushurl.

This confused me since after a jj git push (which only pushed to my mirror), I did a jj git fetch (which pulled from upstream) and it wiped the commit.

Specifications

  • Platform: Linux zzz 6.11.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 x86_64 GNU/Linux
  • Version: jj 0.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions