News for hackers. Stuff that matters.
Re:Pijul: Version-Control Post-Git • Goto 2023 by globalreset on Saturday August 12, 2023 @12:51AM (#37097152)
I disagree. Merge conflicts are just a fact of life, and line-granularity has good usability properties (displaying and editing). `git` has issues, but I don't see merge conflict granularity being an issue, especially when project enforce consistent&automatic formatting.

I agree however that while Pijul is technically very interesting, it doesn't seem to have any killer features that would overcome the cost of switching to a niche version control.

Re:Pijul: Version-Control Post-Git • Goto 2023 by appplication on Saturday August 12, 2023 @01:36AM (#37097329)
> line-granularity has good usability properties

I was reviewing a PR today and have to disagree with you. There was a single value change in a jsonl test data file. This is nightmarish to read in regular git diffs, as the change gif thought was happening was (with text wrapping) an full page worth of json rather than identifying it was a single word change. And because it is jsonl, the file could not be split into different lines without altering it’s semantics.

I don’t think it’s unreasonable we could be a little smarter here.

Re:Pijul: Version-Control Post-Git • Goto 2023 by hurril on Saturday August 12, 2023 @02:24AM (#37097557)
Diffs come with column offset coordinates, though, so perhaps it's your diff editor that needs some more muscle?
Re:Pijul: Version-Control Post-Git • Goto 2023 by nsajko on Saturday August 12, 2023 @03:08AM (#37097800)
Yeah, meld handles this fine.
Re:Pijul: Version-Control Post-Git • Goto 2023 by Groxx on Saturday August 12, 2023 @09:22PM (#37105737)
I can believe that they can come with that... but `man diff` doesn't mention it at all, I can't find any description of the diff/patch format that mentions it, and I've literally never seen it. I do frequently get multi-megabyte single-line diffs though, which amount to just one or two characters changing.

Other tools exist, of course, but if you're going to be shipping around stuff that `git apply` or thousands of other tools can handle, it has to be in "the" standard format.

Re:Pijul: Version-Control Post-Git • Goto 2023 by heavenlyblue on Saturday August 12, 2023 @03:18AM (#37097850)
Simply auto-format that jsonl file and your git is going to be happy.
Re:Pijul: Version-Control Post-Git • Goto 2023 by gorgoiler on Saturday August 12, 2023 @03:38AM (#37097963)
JSONL and line-oriented version control are never going to play nicely together.

Imagine doing code review in a language where every function had to be written on one line!

The two techniques I use to dodge this:

1/ Switch from JSONL to a list of objects then pretty print it to be line oriented.

2/ Compress the test data to discourage viewing it altogether, and make people describe what’s being changed rather than leaving it up to the diff to show it.

Re:Pijul: Version-Control Post-Git • Goto 2023 by Hendrikto on Saturday August 12, 2023 @08:39AM (#37099583)
You could just use a better diff tool. Git itself is format-agnostic.
Re:Pijul: Version-Control Post-Git • Goto 2023 by pastage on Saturday August 12, 2023 @12:29PM (#37101798)
This is an area where it should be easier to build tools for that. I have tools for diffing k/v and structured formats but they are local on my machine. Being able to publish those to Gitlab, github and bitbucket would be great.

Edit: Worst is diffing yaml files, you really need a stable way to parse those.

Re:Pijul: Version-Control Post-Git • Goto 2023 by willow8349 on Saturday August 12, 2023 @03:38AM (#37097967)
Line granularity is not very good though. In fact it misses an op

If I have func add() and main() inside of my first file, main() calling add(), and then I decide to move add() into its own file, nothing else.

What has actually changed and what is relevant to the developer? An ideal tool would give me two pieces of information:

1) most importantly and obvious: the add function has been moved out of main into a new file

2) to save me the time of wondering what else has changed, it should also recognize and tell me upfront that the code is materially the same

Line diffs would just show a bunch of adds and deletions which is good enough to not miss the change I guess , but not enough to tell you quickly what happened. Obviously this is a simple example.