-
Notifications
You must be signed in to change notification settings - Fork 343
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
everything: Rename branches
to bookmarks
#4341
Conversation
I think we need to keep |
Yes, I'll need to partially revert those changes. |
Do the bookmarks actually differ from tags? |
You can't move tags |
Which tags are you talking about, as tags could mean Git tags which we partially support or a |
To clarify, the main difference between bookmarks and tags is that bookmarks move when you rewrite a commit. So if you run |
From a high level viewpoint, it seems like bookmark would not cause a change in the display of the graph, but a branch would. So if you rename the concept of branch to bookmark, the creation of a bookmark would leave the graph in a straight line. |
@joyously Just to be clear, do you mean "lightweight tags" (refs) or "annotated tags" (objects)? The former wouldn't change the graph structure, but the latter would. Branches/bookmarks in git/hg/jj are refs, and I don't think jj has direct support for objects. Since jj doesn't currently move branches automatically, they essentially function like tags, except for interop purposes. If I understand your viewpoint, you're saying that "branches" sound like objects in the commit graph, so "bookmarks" are a better term for that concept? |
Expect, importantly, when you rewrite the commit they point to. (We also move branches when we propagate changes from remotes and when you abandon a commit) |
@arxanas Since I've never seen much about tags in
No, I didn't say that. I was trying to make sure that the graph wasn't affected. I've just read |
Both git (lightweight) tags and branches are refs - pointers to a commit, "labels" if you will. The distinction between tags and So semantically, tags are named commit-ids, and bookmarks are named change-ids. Of course, you could forcibly (re)move both of those with crud commands if you so desire (in an ideal world, as currently there are no crud commands for tags, we just read them from git) And the future topics are named infectious (expand automatically when you create child commits, for the analogue of advancing branches) sets of commits, and not sets as in revsets, but actual real commits - and hopefully are to be the main tool for working with "branches" (but not like in git since we minimize global state, and topics are incredibly more versatile) in jj. |
@necauqua Thank you. Perhaps you should put that writeup in the intro doc. Include the commands to create/delete a branch in the graph while you are at it, for completeness. |
62dcf2f
to
892d9d8
Compare
4c9b2d0
to
64e1a47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a partial review for now
3c4c74e
to
1bcd9d7
Compare
1bcd9d7
to
ba4c203
Compare
ba4c203
to
6392506
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I like this PR, I cannot be confident that I've reviewed these changes thoroughly. It'll be nice if we can split this into smaller commits (something like UI changes + minimal test updates, other test changes such as renaming "branch1" to "bookmark1", internal API renames, ..), but I guess doing that would be tedious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got through a bit of the new bookmarks.md
.
A couple of my suggestions definitely need fixing.
The rest are dependent on the questions of how we'd like our terminology of branches on the Git remote to work. For me, the most natural option would be to talk about branches on the Git remote, local bookmarks, and (most controversially) remote-tracking bookmarks. We could later split this file and talk about different kinds of remotes (once we support remotes other than Git remotes).
So, I suggested a few edits that maybe should not be acted upon until people agree how we want to speak of this. I didn't do those for the entire file, just a few to give people a taste of one option.
6392506
to
3720f48
Compare
I'd like to have "natural" option, but the whole |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pure mechanical change done via LSP, ripgrep and sed with some manual fixups.
I think this is obsolete, right?
3720f48
to
351f282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just as easy for any reviewers to send followup PRs to fix anything they find as it is to comment on this PR, so I think it makes sense to just merge this as is.
351f282
to
19e2dc5
Compare
Jujutsu's branches do not behave like Git branches, which is a major hurdle for people adopting it from Git. They rather behave like Mercurial's (hg) bookmarks. We've had multiple discussions about it in the last ~1.5 years about this rename in the Discord, where multiple people agreed that this _false_ familiarity does not help anyone. Initially we were reluctant to do it but overtime, more and more users agreed that `bookmark` was a better for name the current mechanism. This may be hard break for current `jj branch` users, but it will immensly help Jujutsu's future, by defining it as our first own term. The `[experimental-moving-branches]` config option is currently left alone, to force not another large config update for users, since the last time this happened was when `jj log -T show` was removed, which immediately resulted in breaking users and introduced soft deprecations. This name change will also make it easier to introduce Topics (#3402) as _topological branches_ with a easier model. This was mostly done via LSP, ripgrep and sed and a whole bunch of manual changes either from me being lazy or thankfully pointed out by reviewers.
19e2dc5
to
e8520c2
Compare
🚀 Looked like way more of a process getting this merged than I would have expected. Thanks! |
This applies some suggestions from Ilya from #4341 and starts to differentiate in terminology.
This applies some suggestions from Ilya from #4341 and starts to differentiate in terminology.
Since jj-vcs/jj#4341, `jj` has renamed branches to bookmarks. Once the next `jj` is released, references to `-T branches` will be deprecated. I should merge this PR when that release happens
Since jj-vcs/jj#4341, `jj` has renamed branches to bookmarks. Once the next `jj` is released, references to `-T branches` will be deprecated. I should merge this PR when that release happens
Since jj-vcs/jj#4341, `jj` has renamed branches to bookmarks. Once the next `jj` is released, references to `-T branches` will be deprecated. I should merge this PR when that release happens
Jujutsu's branches do not behave like Git branches, which is a major hurdle for people adopting it from Git. They rather behave like Mercurial's (hg) bookmarks.
We've had multiple discussions about it in the last ~1.5 years about this rename in the Discord, where multiple people agreed that this false familiarity does not help anyone. Initially we were reluctant to do it but overtime, more and more users agreed that
bookmark
was a better for name the current mechanism. This may be hard break for currentjj branch
users, but it will immensly help Jujutsu's future, by defining it as our first own term. The[experimental-moving-branches]
config option is currently left alone, to force not another large config update for users, since the last time this happened was whenjj log -T show
was removed, which immediately resulted in breaking users and introduced soft deprecations.This name change will also make it easier to introduce Topics (#3402) as topological branches with a easier model.
This is a pure mechanical change done via LSP, ripgrep and sed with some manual fixups.
cc @thoughtpolice for help writing the deprecation text in the CHANGELOG.
Checklist
If applicable:
CHANGELOG.md