-
Notifications
You must be signed in to change notification settings - Fork 833
cli git push: allow pushing explicitly named bookmarks #8239
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
base: main
Are you sure you want to change the base?
Conversation
|
Move the PR description to the commit message, as it should be the motivation there. Since you know the project doesn't really care about PR descriptions but commit message descriptions. |
5859f0c to
670c57d
Compare
|
I don't think links to various places where this issue has been talked about is interesting to people reading the commit history later? I thought it might be mildly useful context for reviewers though. I updated the commit message with a different, longer motivation. |
|
iirc, the problem was that Git users would expect that the specified bookmark would be pushed to the associated upstream remote. However, jj's bookmark doesn't have a single upstream remote, and |
|
I see, I didn't think about that... I guess the behavior that would make sense to me is:
|
|
Yes, my original patch (or the second one) was something like that, but it wasn't easy to document and understand. Therefore we added Also note that |
e50d03a to
954d4b9
Compare
|
I added some more precise logic to determine when the user intent is unambiguous. I intend to add a test covering each conditional branch, but we could already discuss if we agree on the logic. Edit: tests added |
By explicitly naming the bookmark to push, users already express their intent to push that particular bookmark. Requiring them to express that intent a second time by manually marking the bookmark as tracked is therefore unnecessary. There are some exceptional situations where the intent can still be unclear related to multiple remotes and glob patterns.
954d4b9 to
1e7b99f
Compare
This idea was recently mentioned again. There was a feature request about it, but it was closed as a duplicate of the discussion about auto-tracking bookmarks. In the preceeding discussion I brought up the idea that
jj git push --bookmarkshould work for yet-untracked bookmarks. I think it was overlooked a bit because other, more important topics were being discussed in the same thread. I still think this has merit on its own, now that auto-tracking bookmarks has landed.CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)