Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming git remote renames the remote-trunk revision, but does not update associated revset trunk() alias #5488

Open
aThorp96 opened this issue Jan 27, 2025 · 1 comment
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@aThorp96
Copy link

Description

Renaming git remote renames the remote-trunk revision, but does not update associated revset alias(es) causing subsequent jj commands to emit a warning until the user manually fixes the automatically generated repo config.

Steps to Reproduce the Problem

  1. Clone a repository - jj git clone [email protected]:jj-vcs/jj.git && cd jj
  2. List existing git remotes and confirm origin is present - jj git remote list
  3. List the trunk() revset alias - jj config get 'revset-aliases."trunk()"'
  4. Rename the origin upstream to upstream - jj git remote rename origin upstream

Expected Behavior

Jujitsu renames the remote to upstream, renames the main@origin revision to main@upstream, and updates the trunk() revset alias to main@upstream.

Actual Behavior

  • Remote origin is renamed to upstream
  • The main@origin revision is renamed to main@upstream
  • The repo's configuration for revset-aliases."trunk()" remains main@origin, which no longer exists
  • All subsequent jj command emits an error: Warning: Failed to resolve revset-aliases.trunk(): Revision "main@origin" doesn't exist until the user fixes with jj config set --repo 'revset-aliases."trunk()"' 'main@upstream'

Specifications

  • Platform: Fedora Linux 6.12.9-100.fc40.x86_6
  • Version: jj version 0.25.0
@PhilipMetzger PhilipMetzger added the polish🪒🐃 Make existing features more convenient and more consistent label Jan 27, 2025
@yuja
Copy link
Contributor

yuja commented Jan 28, 2025

fwiw, if we make the trunk() value be managed by jj, I think it's better to store the trunk ref in view (= repository data), not in config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polish🪒🐃 Make existing features more convenient and more consistent
Projects
None yet
Development

No branches or pull requests

3 participants