Live data from Hacker News

Pijul – A free and open source distributed version control system

pijul.org

141–150 of 180 posts

Re: Pijul – A free and open source distributed version control system

#141
post #91

Earlier quoted context omitted.

I don't understand, you will have to use more words. I've never used darcs, and as a git user I don't see how you could cherry-pick by default for commiting. By default, I would say you… create a commit object with the author/date/message/tree/parent metadata recorded in it.

When you type git pull, it has a remote and a ref at that remote, and it attempts to merge (ff notwithstanding) the DAG you have with the DAG the remote has. When you type darcs pull, darcs lets you pick and choose which patches (subject to the dependency constraints) you want to pull in. Those patches then get applied however darcs wants to apply them (again, subject to dependency constraints, of cousre). Because yo…

I still don't get it: pulls don't merge DAGs, they add objects and move refs (and maybe merge); every time darcs fans say 'patch' (as a collection of related changes) I think, 'oh like a branch?'

This sounds less and less like a tools/implementation thing and more like the default recommended/enforced workflow thing.

Re: Pijul – A free and open source distributed version control system

#142
post #137
post #94

Earlier quoted context omitted.

Speed is about the only user-facing difference. But the big user-facing difference is that commits are glued to their parents. They really are glued; the merges and potential conflicts involved with rebasing and cherry-picking are a consequence of trying to undo this glue. Darcs' and pijuls' patches aren't glued, they only either commute or do not, and the conflict resolution mechanisms for non-commutative patches ar…

What does commute mean in this context? I'm getting the impression that it means that the original line of code that the patch references and is going to change is where the patch expects it to be.

It's probably best to get this from the source:

https://en.wikibooks.org/wiki/Understanding_Darcs/Patch_theo...

Re: Pijul – A free and open source distributed version control system

#144
post #81

Earlier quoted context omitted.

As I've mentioned elsewhere, git is GPL, so Macs are screwed regardless. :P

And yet macOS ships with Git, version 2.10. GPL(v2) licensed and everything. It's not about GPL, it's about GPLv2 vs GPLv3 and the requirements that come with it.

I had no idea that Macs shipped with git, happy to hear it. :)

Re: Pijul – A free and open source distributed version control system

#145
post #91

Earlier quoted context omitted.

When you type git pull, it has a remote and a ref at that remote, and it attempts to merge (ff notwithstanding) the DAG you have with the DAG the remote has. When you type darcs pull, darcs lets you pick and choose which patches (subject to the dependency constraints) you want to pull in. Those patches then get applied however darcs wants to apply them (again, subject to dependency constraints, of cousre). Because yo…

I still don't get it: pulls don't merge DAGs, they add objects and move refs (and maybe merge); every time darcs fans say 'patch' (as a collection of related changes) I think, 'oh like a branch?' This sounds less and less like a tools/implementation thing and more like the default recommended/enforced workflow thing.

How does the fetch part know which objects to grab? (Answer: because it cared about the DAG first.)

Re: Pijul – A free and open source distributed version control system

#146

Earlier quoted context omitted.

That sort of response, "only uneducated people think...", really shuts down conversation, and is a hindrance to constructive discussion. Whether or not AGPL is 'problematic' is something that can be discussed without ad-hominem attacks.

Sorry, I did not mean it like that. ESL here.

Thanks for clarifying! Reading your original comment in the context of this comment, I understand how your first comment probably is not what I thought it was originally.

Re: Pijul – A free and open source distributed version control system

#147
post #91

Earlier quoted context omitted.

When you type git pull, it has a remote and a ref at that remote, and it attempts to merge (ff notwithstanding) the DAG you have with the DAG the remote has. When you type darcs pull, darcs lets you pick and choose which patches (subject to the dependency constraints) you want to pull in. Those patches then get applied however darcs wants to apply them (again, subject to dependency constraints, of cousre). Because yo…

I still don't get it: pulls don't merge DAGs, they add objects and move refs (and maybe merge); every time darcs fans say 'patch' (as a collection of related changes) I think, 'oh like a branch?' This sounds less and less like a tools/implementation thing and more like the default recommended/enforced workflow thing.

To start by adding to your confusion: one of the early problems encountered in darcsgit interaction actually was that sometimes a darcs patch acts more like a git branch than a git commit...

It might help to compare the "identity" structures of git commits versus darcs/pijul patches. In a pseudo-C, you can see a git commit as something like:

    struct commit {
      string author;
      string description;
      tree_id tree_snapshot;
      commit_id[] parent_commits;
    }
If any of those fields change (are amended), you have a new commit.

This is a directed acyclic graph (DAG) because of that `parent_commits` link from one commit to the immediate previous parents (it can be multiple parents in the case of a merge commit). Git can only just move refs on a pull in the case of a "fast forward" when the remote branch is "simply" ahead of the current branch and all of its new commits "point to" the last commit in the current branch. Every other case it is a merge of the graph (via a merge commit with two or more parent commits).

(While git outputs a diff as the representation of the commit in places like `git show`, a commit doesn't store the diff but instead a link to a snapshot of the tree at the time of the commit.)

For something like darcs/pijul, the identifying information of a patch looks something more like:

    struct patch {
      string author;
      string name;
      change[] changes;
    }
If any of these things are changed (amended) you have a different patch.

This may seem like semantic quibbling in that the patch here actually contains the diffs as a part of its identity rather than a snapshot of a source tree, but that's not actually the important difference.

The important difference is that the context of the patch is no longer a part of its identity: there is no "parent patch" information, and the change structures don't directly refer to previous changes.

The reason that difference matters is because in the darcs/pijul models the context of the patch is more "metadata" about the patch than a direct part of the patch. Patches aren't "nailed" to a graph like a commit is, they "float in a basket" together. Darcs and pijul do the work to figure out which patches need to be in which order in a branch/repository.

This can be a nightmare to someone expecting a strict graph. Darcs and pijul can and will reorder history during a pull. You can see "newer" patches float down under "older" patches in the patch log as the systems work to build a stable sort of patches.

That movement, however, is also where the systems draw the most strength. That movement of the patches can be seen as a continual, rustling "cherry arranging" as the systems work to figure out the minimal set of previous changes that patch needs in order to exist.

If you cherry-pick a commit in git you copy the changes from that commit to the new branch (a new spot in the DAG) into a new commit with its own new identity. Down the line when you go to reintegrate/remerge the branches between the original branch and the cherry picked branch, git doesn't see the same commit/change and its merge can (in my experience, will) see conflicts in the exact same change made in different contexts.

When you cherry pick a darcs/pijul patch, you bring over the same exact patch and the system lets you know any other minimal dependencies that you need and brings them over as well. When you reintegrate/remerge the cherry picked branch, those exact same cherry-picked patches are already "in" the original branch and so don't necessarily need to be remerged/rearranged again.

You can duplicate git workflows on top of darcs/pijul, but it is very hard to duplicate some of the more interesting darcs/pijul workflows on top of git. Among other things, rebase/cherry-picking merge hell is a very real problem in the git ecosystem, whereas darcs/pijul almost seem like crazy smart magic in comparison when it comes to some of the scenarios where you might rebase or cherry-pick.

It might be something that won't entirely make sense until you try experimenting with it yourself: maybe, you might want to take darcs for a spin for a small project or two. I think you can feel a lot of the difference as you use it, especially as you start to push/pull between branches/repositories.

(Anecdotally, my workflows are quite different on darcs versus git, knowing that typically I could fix a bug discovered elsewhere in the code in the middle of a bigger project, without needing to branch, I would often just record that change into a tiny patch on its own right there on the spot, and generally know that if I needed to get just that one patch into another branch I could rely on darcs to cherry pick it for me later.)

Re: Pijul – A free and open source distributed version control system

#148
post #133

Earlier quoted context omitted.

>I feel that AGPL for a product is misunderstood and pre-rejected without justification by far too many. Isn't that precisely the parent comment's point? Perhaps it shouldn't be this way, but the argument is that the AGPL will make pijul "untouchable" by businesses, de facto .

Precisely. I'm not arguing based on some reasoning of my own that AGPL is bad. I'm arguing based on working at a previous big company where if you checked in AGPL code, Ninjas in hazmat suits broke through the skylights and parasailed down to exorcise the toxic intrusion. Enough mixed metaphors?

> if you checked in AGPL code

This sounds like taking some of Pijul's source code and putting it inside another project. That would certainly have business implications, which justifies ninjas. It's possible to use AGPL as a business strategy (I worked at a company whose main product used CPAL[1] which has a similar network-use clause); but such decisions should not be made via VCS commit.

Of course, if the choice of AGPL prevents a business from reusing Pijul's code then presumably that's why they chose AGPL. That's kind of the point of copyleft.

I imagine very few businesses would care about Pijul's source code though. If Pijul matures into a compelling tool, then the relevant phrase would be "if you used an AGPL command"; no need for ninjas there, unless (as others note) you're building a PijulHub or something.

[1]: https://en.wikipedia.org/wiki/Common_Public_Attribution_Lice...

Re: Pijul – A free and open source distributed version control system

#149
post #124
post #104

Earlier quoted context omitted.

I think you've hit the nail on the head :)

Those reasons make sense. Would it be fair to summarize all that as "better merging with fewer merge conflicts"? Git certainly has some room to improve in the merge conflict department. I looked at the bad merge example you posted -- I suspect I've hit that before. It's rare, but yeah it's there. I also frequently notice that git complains about merge conflicts, while the custom diff tool I use to resolve them says t…

Right, the raw representations are convertible (at some point a patch-oriented darcs/pijul has to build a snapshot so that it can build a working tree; at various times you want to see the diffs in git or format a patch file to email). It does have more to do with the representation of change context both between patches (strict DAG versus algebraic sets with looser change context models), and even to some extent within a patch (in a classic diff the tools use hardcoded line numbers; in something like darcs/pijul even the line numbers of a patch aren't necessarily taken as a given and are a part of the context of the change).

Re: Pijul – A free and open source distributed version control system

#150
post #84

Earlier quoted context omitted.

So, I didn't believe you because my internal mental model of a git repo is a DAG of changesets. And indeed, that is a good way to think about it, because almost all of git's operations behave like this. Commit history is almost always presented to the user as a series of diffs. But, you are correct. Internally, git stores the full contents of files and computes the diffs on the fly. For others' benefit, if you want t…

I thought git stored diffs too. But I don't understand what difference it makes, isn't the commit storage format an implementation detail? If you want to get to B from A, then I can store B or store B-A. When I have B and want to show a diff, I can calculate B-A. When I have B-A and want to show a diff, it's a no-op. When I have B and want to work, it's a no-op, but when I have B-A and want to work, I have to populat…

A video referred to by another user on this thread puts it very clearly: https://news.ycombinator.com/item?id=13645102
Post reply on HN