-
Notifications
You must be signed in to change notification settings - Fork 365
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
FR: jj bisect
, a general purpose bisection command.
#2987
Comments
For anyone thinking of working on this, note that we'll want to implement by adding a method on the |
Some useful extensions for bisection:
In the latest
So I think we should punt on "true" |
any updates on this? |
I don't think anyone is working on it. In case you or someone else is thinking of working on it, I'll mention that there are some open questions:
Yes, I was thinking the user would just 4-sect for a 2x speedup (assuming enough resources to run 4 concurrent jobs) or 8-sect for a 3x speedup. More than that would probably usually not be worth it (and anything more than bisection might also often not be worth it).
Sounds good. |
Does this entail more than materializing different commits as the working copy? |
Correct, it would include good/bad state.
Right, it's still stored somewhere in
That's true regardless. Both git and hg have an option to skip a commit if you can't determine if it's good or bad. |
If you or someone else wants to work on this, you can take a look at
Also, let me know and I'll push some recent work/changes to In the below comment, I've also discussed how git-branchless/
I think so as well.
I think so.
I'll also mention that there's two main user workflows for bisection/search:
We don't necessarily need a fully-scaling solution to begin with (and hopefully the abstractions defined by
Is there a reason not to resolve it immediately when the
[practical answer] Ideally,
[theoretical answer] I ended up deciding that
[aside] By the way, I don't think there's any reason to expose a literal
[related note] |
For naming, I like how Footnotes
|
I'll be honest, my names have turned out to be pretty awful in practice, so I'd stay away from a name that I invented just by default 🤣. (Examples: git-branchless, scm-record, scm-diff-editor have all been confusing or hard to remember; there was actually a thread somewhere where we confirmed that I originally stole the name from https://github.com/spotify/git-test, but then expanded the functionality. The idea of unifying many run/check/search/fix workflows under some interface is probably worth exploring at some point, but probably with more care than I exercised.
|
I'd be interested to know more about the reason. They are not immediately obvious to me, so it's valuable knowledge (to me, at least).
Yeah, I tried to mention that. Your sentence also suggests Update: It could also be |
This was the thread I was thinking of (5 respondents if you include reactions... including you!): https://discord.com/channels/968932220549103686/1273367388787839016/1274830013186969741 |
No, that's past me. A distant acquaintance, strange guy with strange opinions. 😝 Well, I guess past me and present me mostly agree on |
It actually wasn't any of the reasons you guessed :) I was thinking of the additional complexity and of the risk of users shooting themselves in the foot by incorrectly assuming that something is a problem in cli/ when it's actually or lib/ or something like that. But I do think we should support it. I don't think those concerns are much to worry about.
We want it to scale for non-OSS users too, but perhaps it could be used internally in the default index backend.
Yes, that is the reason.
Let's say you have commits A through Z. You start with a working copy on top of commit Z. Now you bisect over the range |
I think it should work out fine. The provided I can discuss more + potentially redesign
git-branchless mostly addresses this via UI:
With some good UI, hopefully it'll be apparent to the user when they try to bisect 100M commits 🙂
I was supposing that the problem with computing/resolving the revset up-front might be that evaluating a filter like
Coming back to this point, I don't understand whether you're saying that this is a problem by itself, and whether this is an unaddressed problem. Does this mean that it's too expensive to even represent the 100M commits, i.e. evaluate a revset that's too large?
|
I don't mean that they shouldn't do that. I mean that we should support it without eagerly evaluating the set of 100M commits.
Right, it's fine to represent a range like So my concern was with e.g. |
For my own future reference, there was a Discord thread to follow up on this topic. Some highlights:
|
Is your feature request related to a problem? Please describe.
We're currently missing a bisection command which is freestanding from #1869, so something like
jj bisect
.Describe the solution you'd like
Add
jj bisect
with a option to integrate with #1869, e.gjj bisect --run '<command>'
.This was previously discussed in Discord about ~9 months ago and it was brought up that it was important for Google to have a separate command, as there are many commits in-flight there.
We also should look to integrate with scm-bisect.
The text was updated successfully, but these errors were encountered: