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

Inconsistencies in "remote" and "branch" variables #1358

Closed
xicod opened this issue Dec 1, 2024 · 2 comments
Closed

Inconsistencies in "remote" and "branch" variables #1358

xicod opened this issue Dec 1, 2024 · 2 comments

Comments

@xicod
Copy link

xicod commented Dec 1, 2024

If I'm not mistaken, following this commit 3c2cdb4 the %(branch) variable is now empty for commits that are not directly referenced.
So I had this key binding:

bind main P !git push %(remote) %(commit):%(branch)

That now stopped working.
I've changed %(branch) to %(repo:head) and got it to work again.
What I don't understand is why %(remote) is still set?
I would expect to use %(repo:remote) instead, but that is set to 'origin/master' instead of the expected 'origin' and git fails to push.

Thoughts?

@koutcher
Copy link
Collaborator

koutcher commented Dec 7, 2024

Unlike %(branch), %(remote) was created with a default value when unset.

I agree that, for consistency with Git, the current %(repo:remote) should actually be named %(repo:upstream) and that %(repo:remote) should contain only the remote name.

@xicod
Copy link
Author

xicod commented Dec 8, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants