News for hackers. Stuff that matters.
Re:Jujutsu for Busy Devs by 0x457 on Monday July 21, 2025 @10:44PM (#44642753)
Reason I like git is because I use like 2% of its features. I don't fall for propaganda that I need to use bisect and co. 99% of git commands I call are aliased to 3 characters, so it's dense terminology doesn't bother me.
Re:Jujutsu for Busy Devs by Valodim on Tuesday July 22, 2025 @01:19AM (#44643474)
There were (are?) people who say the same thing about svn
Re:Jujutsu for Busy Devs by 0x457 on Tuesday July 22, 2025 @12:57PM (#44649959)
Sure, but in this case, git being distributed is what sold it for me. I've switched off svn as soon as I've learned of git.
Re:Jujutsu for Busy Devs by globular-toast on Tuesday July 22, 2025 @02:45AM (#44643868)
I relish the day I get to use bisect. It's like, finally I get to use all this version data I've been collecting.

I don't understand why anyone would say you have to use it. It does a very specific thing, namely finding the source of a regression between two commits. If you need it you'll know.

Re:Jujutsu for Busy Devs by tcoff91 on Tuesday July 22, 2025 @02:53AM (#44643933)
It’s really nice to use the β€”-first-parent flag with bisect.
Re:Jujutsu for Busy Devs by globular-toast on Tuesday July 22, 2025 @04:11AM (#44644423)
Yeah this is good if you, for some reason, rebase then merge without fast forwarding. I never understood doing this. If I'm going to be ignoring those commits when bisecting then they are useless commits just using up disk space IMO.

Does it work well with a classic merge workflow? I haven't worked that way (without rebasing) for a long time.

Re:Jujutsu for Busy Devs by 1718627440 on Tuesday July 22, 2025 @06:15AM (#44645141)
For me a merge is about grouping commits, when you have just a list of commits, the list can be very long.

That's also useful for bisecting, as you can first find the feature that is buggy and then find the commit that introduced it.

Re:Jujutsu for Busy Devs by globular-toast on Tuesday July 22, 2025 @06:42AM (#44645304)
The whole point of bisect is to make it quicker to find a point in a potentially long list of commits. Finding the feature first then bisecting within the branch is only going to make it slower, and requires you to manually restart the bisect.

I use the commit message to add ticket numbers to things to group commits.

Re:Jujutsu for Busy Devs by 1718627440 on Tuesday July 22, 2025 @07:17AM (#44645500)
The commits surrounding them (logically) are probably also relevant, which you will find easier when you have grouped commits by features.

I prefer to have everything in a single source of truth (git), so everything is in commits. Your tickets are my merge commits.

Re:Jujutsu for Busy Devs by ykonstant on Tuesday July 22, 2025 @02:59AM (#44643975)
Bisect is a wonderful feature. Git is full of tedium and frustration, bisect is not part of that.
Re:Jujutsu for Busy Devs by falconertc on Tuesday July 22, 2025 @03:30AM (#44644165)
Bisect is a very cool feature that I used once over 5 years ago. The collection of git tools that I sue often is very small. I've found that the more experienced I got with git, the less I found myself in scenarios where I needed git's more complex tools.
Re:Jujutsu for Busy Devs by theLiminator on Tuesday July 22, 2025 @05:09AM (#44644772)
Hmm, bisect is definitely not one of those.
Re:Jujutsu for Busy Devs by 1718627440 on Tuesday July 22, 2025 @06:13AM (#44645127)
Yes not using bisect, seams like you do all the work to record information, but then never use that information to save work?
Re:Jujutsu for Busy Devs by 0x457 on Tuesday July 22, 2025 @12:54PM (#44649913)
May I use how often and why you use bisect? I don't remember the last time I needed bisect. Well, I also don't work in linux kernel sized repos, so there is that.
Re:Jujutsu for Busy Devs by 1718627440 on Tuesday July 22, 2025 @01:08PM (#44650143)
> May I use

Was that 'may I ask'?

Not that often, but not seldom. Its useful if you have a bug, that isn't obvious where it comes from, but easily testable. Then you just write a test and let git figure out where it comes from. The test doesn't need to be automatable. I also used it for firmware that needs to be flashed and the bug effected in an LED blinking incorrectly. I still saved a lot of time.

Re:Jujutsu for Busy Devs by 0x457 on Tuesday July 22, 2025 @04:44PM (#44652765)
> Was that 'may I ask'?

Yes, can't type sometimes.

I see. Maybe it's just what kinda of code and/or how I write it, usually pretty clear which abstraction isn't doing its thing. From there, it's either clear what is the bug, or git blame will reveal what changed.

This has a much higher chance of succeeding if you maintain strict boundaries and isolation which isn't always possible.

Re:Jujutsu for Busy Devs by 1718627440 on Wednesday July 23, 2025 @09:58AM (#44659303)
In addition to bugs this is also useful to pinpoint behaviour change.
Re:Jujutsu for Busy Devs by 0x457 on Tuesday July 22, 2025 @12:47PM (#44649758)
Sorry, that meant to be a joke. Bisect is cool and easy to use, I just never use it.
Re:Jujutsu for Busy Devs by anticodon on Tuesday July 22, 2025 @03:16AM (#44644069)
I used bisect once in my life but it was extremely helpful. Without it I'd spend weeks trying to find regression. With bisect I found and fixed it in under 1 hour.

It's a command that is needed rarely but there's no replacement for it in some situations.

Re:Jujutsu for Busy Devs by pclowes on Tuesday July 22, 2025 @02:41PM (#44651321)
I am confused by this, isn't Bisect just some git ergonomics with respect to flagging a checked out commit as a success failure and then checking out the next midway commit depending of if it was a success/failure to enable classic binary search?

It might be slightly more tedious but couldn't you just do the same thing manually and it would add just a couple minutes to the search and you would still save weeks? I like the ergonomics but only use it once every couple years.

Re:Jujutsu for Busy Devs by anticodon on Wednesday July 23, 2025 @03:32AM (#44656643)
Agree, probably could be done in any other VCS as well, including CVS. But only possible if you actually use VCS and use it properly.