Replies: 10 comments 25 replies
-
The difference between |
Beta Was this translation helpful? Give feedback.
-
Well, interpretation of anything depends on the fundamentals, or first principles and editing current (WC) commit is IMHO default mode of operation of JJ. That's probably the first thing anybody would learn that editing files in WC changes WC commit (and rebases it's possible descendants) and through this understanding they would try to interpret anything new... |
Beta Was this translation helpful? Give feedback.
-
Note that we have a I'm rather we not bring it back with some totally different-but-somewhat-similar behavior; Realistically, Again, it's all a bit moot, because I'd rather we stick to our guns, actually deprecate it, and eventually remove it entirely from the default UX. Assuming we do this, then it can become an alias for whatever you want, too. This is really much better in the long run because some people have other ideas for how checkout should behave; we've had requests for it to be equivalent to I do not think there is one, consistent interpretation of "checkout" that actually makes 100% sense and is perfectly analogous to how Git works, which in practice is what people want us to do for things like this. Much of the default "working flows" in Jujutsu are fundamentally different enough from Git that I don't think |
Beta Was this translation helpful? Give feedback.
-
I'm definitely not trying to bring ilogical git nomenclature here, on the contrary. If people percieve checkout in such burdened way, than I'm for using switch (or something totally new), which is probably not so much loaded. The thing is, any newcommer will soon realize that editing WC commit is it's default mode of operation and it's distinguishing feature, so calling something |
Beta Was this translation helpful? Give feedback.
-
I think I'm admit I'm not so sure I follow you. In my view, Jujutsu is defined by the fact that most operations, in a broad sense, work on the commit graph, not on the "working copy", and almost everything is a commit in the graph. Including the working copy — it is just a specific commit in the graph, one that is updated automatically, but not much more than that. So, this worldview means you create new nodes in the graph ( I think a hidden part of your complaint might be more along the lines of, "what is the right conceptual workflow for Jujutsu", i.e. when do I do
(BTW, this tutorial/guide is pretty good and IMO much better than our own which is somewhat dated, so if you're a new user and you haven't seen it, you might enjoy reading it!) Most of us use the "squash" workflow. So in this case I don't actually see "edit" as the "default" as you suggest; rather it's the other way around. About 90% of the time, I use So, I think a big part of the problem isn't so much the actual name of the command (again, I think |
Beta Was this translation helpful? Give feedback.
-
@thoughtpolice Yes, I think you don't follow me, because you are basically stating the same philosophy that I mentioned, that upon change JJ is changing WC commit AND it's descendents (as I mentioned in previos comment) as you call commit graph. So if anybody anyhow "switches" to any commit they should know what it could cause and be cautios. IMHO making up for that by changing logical defaults to illogical ones doesn't bring more safety, just more confusion and so more danger... BTW, thank you for the tutorial, that's exactly what I've discovered yesterday and you are right, it's much better than the official one, so it would be great to be mentioned there.... |
Beta Was this translation helpful? Give feedback.
-
The note about danger/chaos maybe helps me understand you a bit more, but I'm afraid I don't see how "switch" is any more explanatory than "edit" in your scenario, or how it makes any kind of danger to the user any more obvious. Actually, I can see how it might be seen as "dangerous" from a Git POV, but the only reason people think switch is dangerous in my experience is because in Git:
In other words, moving the
But most importantly:
These points mean that not only is editing the graph easy, it is also often safer and more reliable than in alternative systems. These are fundamental design decisions that, when taken together, mean that a workflow that is dangerous in Git is safe and even preferable in Jujutsu. But let's step back to the point you brought up; "it can cause chaos." If this is the crux of the matter it may come down to fundamental disagreement. In this case, I believe the problem is not the name of the command, but the very dangerous operation itself. You cannot stop people from doing dangerous things by expecting them to infer the level of danger from the name alone, and then stopping themselves. Many Git users have very poor understanding of how Git works anyway; in my experience they think of everything as dangerous (they just want to get their work done and never used advanced tools) or they think of nothing as dangerous (they delete their own work on accident), and relatively few people have good strong control over the tools to understand all the cases. Even then, they make mistakes. The level of danger that might be implied by a name is not really relevant in my mind; if the user is experienced, they know what it does, but if not, they tend to have simpler understandings, to the point where the name alone cannot capture all the possible dangerous results that they might land in. Expecting the danger to be self-evident by some means — way of analogy ("switch is dangerous in Git, therefore it is dangerous here too"), or something else — is, frankly, a losing battle. This actually is a discussion that goes beyond Rather, if there are dangerous scenarios that can appear for a user, resulting in cases where they can make irrevocable mistakes — we should either make these scenarios impossible by design (rebase example above is nearly impossible in There are some scenarios that can make |
Beta Was this translation helpful? Give feedback.
-
@martinvonz I believe you answered those questions honestly, but it's hard to answer them with the beginner's mind, if you are not in that state. |
Beta Was this translation helpful? Give feedback.
-
@bnjmnt4n I was also thinking about something like |
Beta Was this translation helpful? Give feedback.
-
My two cents: |
Beta Was this translation helpful? Give feedback.
-
edit
is a bit unfamiliar term in the context of VSC and could imply some data/history modifications (which it doesn't do by itself), so using eitherswitch
orcheckout
would be probably easier to get for newcommers (like me 😀) and better convey the fact that it just switches WC like theprev
andnext
commands (with -e parameter).Beta Was this translation helpful? Give feedback.
All reactions