Live data from Hacker News

Sapling: A new source control system with Git-compatible client

engineering.fb.com

481–490 of 543 posts

Re: Sapling: A new source control system with Git-compatible client

#481

> There is no staging area. I don't actually want "No" staging area. What I want is, once I "add" something, the file stays added. Currently, I have `git st` alias setup : st = !git add -u && git status This auto-updates the staging area for files that were previously staged. So I get `git add` but also don't have to re-add anything manually from there ... Since I do `git st` quite frequently, this works out for me .…

This would break the workflow of using the staging area to break a larger change into smaller commits. git add -p Allows you to select hunks of changes and stage them for committing...

> git add -p

git commit -p achieves the same, but avoids explicitly using the staging area.

Re: Sapling: A new source control system with Git-compatible client

#482
post #473

Earlier quoted context omitted.

> To use a similar featureset but in the same Git repository you normally use What do you mean? Can't you use Sapling in the same Git repository you normally use? The first sentence is "Sapling is a new Git-compatible source control client". Is there something they're not telling us? EDIT: Looks like it calls out to the git executable occasionally ( https://news.ycombinator.com/item?id=33615576 ) and presumably works…

What I mean is that you can't co-locate your Sapling repository with your Git repository (at least, for now). You have to have them in separate directories and push/pull between them. git-branchless is only an extension to Git, so it naturally operates in the Git repository. Jujutsu has a mode to create the `.jj` directory alongside the `.git` directory and co-locate them, which I find very convenient in practice. (O…

> > Looks like it calls out to the git executable occasionally > > I believe Jujutsu never calls out to Git

Oh, I was referring to Sapling. I know even less about Jujutsu than I do about Sapling!

> > presumably works on the git object model under the hood > > There's no guarantee of this ... but they reserve the right to change that

Interesting. So it would translate between them whenever you push to or pull from a Git repo?

I'm very keen to use Sapling if it's basically a polished interface to Git but less keen if it's an entirely different object model, because then I'm going to have to learn more about what's going on under the hood to understand it properly.

Re: Sapling: A new source control system with Git-compatible client

#483
post #473

Earlier quoted context omitted.

> To use a similar featureset but in the same Git repository you normally use What do you mean? Can't you use Sapling in the same Git repository you normally use? The first sentence is "Sapling is a new Git-compatible source control client". Is there something they're not telling us? EDIT: Looks like it calls out to the git executable occasionally ( https://news.ycombinator.com/item?id=33615576 ) and presumably works…

What I mean is that you can't co-locate your Sapling repository with your Git repository (at least, for now). You have to have them in separate directories and push/pull between them. git-branchless is only an extension to Git, so it naturally operates in the Git repository. Jujutsu has a mode to create the `.jj` directory alongside the `.git` directory and co-locate them, which I find very convenient in practice. (O…

[deleted]

Re: Sapling: A new source control system with Git-compatible client

#484
post #482

Earlier quoted context omitted.

What I mean is that you can't co-locate your Sapling repository with your Git repository (at least, for now). You have to have them in separate directories and push/pull between them. git-branchless is only an extension to Git, so it naturally operates in the Git repository. Jujutsu has a mode to create the `.jj` directory alongside the `.git` directory and co-locate them, which I find very convenient in practice. (O…

> > Looks like it calls out to the git executable occasionally > > I believe Jujutsu never calls out to Git Oh, I was referring to Sapling. I know even less about Jujutsu than I do about Sapling! > > presumably works on the git object model under the hood > > There's no guarantee of this ... but they reserve the right to change that Interesting. So it would translate between them whenever you push to or pull from a G…

> Oh, I was referring to Sapling. I know even less about Jujutsu than I do about Sapling!

I was just remarking about Jujutsu, in the case that it was important to you for some reason whether or not your VCS called out to Git.

> Interesting. So it would translate between them whenever you push to or pull from a Git repo?

To be honest, I don't know. I suspect that, for now, they store real Git objects, rather than translating on the fly. You'd have to ask a Sapling maintainer.

> I'm very keen to use Sapling if it's basically a polished interface to Git but less keen if it's an entirely different object model, because then I'm going to have to learn more about what's going on under the hood to understand it properly.

I might have muddled some layers of abstraction and brought up something unhelpful. Git's object database and Mercurial's revlog are more comparable in terms of where they lie in the abstraction hierarchy, but these are just the storage layers. In practice, I find the Git and Mercurial object models, as exposed to the user, to be similar enough that I pretty much never have to worry about the differences. (Well, perhaps it's true that Mercurial file contents are not addressed by blob hashes, but do I ever really want to address by "blob hash", or just by "the contents of this file at this commit"?)

What I meant to emphasize is that you can't directly use Git to access Mercurial/Sapling's internal object store, if that's important to you (perhaps for scripting). In comparison, with Jujutsu, if you modify the Git object store on disk, it will try to "import" refs the next time you invoke it in order to update its own internal object store to match.

Re: Sapling: A new source control system with Git-compatible client

#485
post #476

Earlier quoted context omitted.

Sure. And a branch is also just a stack of changes… The whole point is that this things are treated differently.

But a branch is a commit but the staging area is an index, which is something different. Why two different concepts when one would do? That's my problem with the staging area.

I don't care how this is implemented. You may be right that the implementation could be more streamlined. But I care only about the functionality.

The whole point is to have some form of "draft commit".

The staging area lets me "stash" WIP changes in a transparent way.

Having a "draft commit" feature avoids the need to rewrite "bad commits" after the fact.

The staging area is really useful to build up commits gradually.

When thinking about it I've just realized that the staging area should not only be kept as a feature but could be even extended. You could add a "change-set management system"—which would be essentially multiple staging areas (maybe coupled to improved stash functionality to be able to quickly move / copy changes between change-sets).

Yes, such a thing would very likely need to be built on top of the mechanics behind branches / commits. But this should be transparent and not interfere with the said features, imho.

Re: Sapling: A new source control system with Git-compatible client

#486

Earlier quoted context omitted.

Due to my workplace I moved from svn to hg (awesome experience) and then from hg to git (terrible experience). That was years ago, and the git experience remains terrible.

Can you elucidate? What did you find appealing/unappealing?

In a nutshell, git has an unintuitive and unfriendly CLI with bad defaults.

I want my VCS to be quiet, out of sight and do as it's told, because my main focus should be programming, not how to tame a tool that's supposed to save text. The fact that you have to "learn git", and that there are so many StackOverflow git question on how to do (what should be) trivial operations is probably a hint that things aren't great in the usability department.

For hg, I just read an introductory guide (I think it was Joel Spolski's one) and that was enough. I used to be able to do a more in-depth comparison and criticism but nowadays I use git and try not to think about it too much.

Re: Sapling: A new source control system with Git-compatible client

#487

Earlier quoted context omitted.

It's not particularly surprising that a surprising amount of infrastructure is needed to run a social network.

Note though that other large projects with similar scaling-git problems tended to just write wrapper tools to work around it, see how Chromium and Android do it.

Android and Chrome are small projects in this context :P

Re: Sapling: A new source control system with Git-compatible client

#488

Earlier quoted context omitted.

It's not particularly surprising that a surprising amount of infrastructure is needed to run a social network.

Note though that other large projects with similar scaling-git problems tended to just write wrapper tools to work around it, see how Chromium and Android do it.

That’s still Google, though. I suspect non-MetaBet companies would try harder to avoid scaling the development team in the first place.

(My other two posts in this thread are -4 and +7 although they both have the same point. Never sure how to interpret that.)

Re: Sapling: A new source control system with Git-compatible client

#489
post #482

Earlier quoted context omitted.

> > Looks like it calls out to the git executable occasionally > > I believe Jujutsu never calls out to Git Oh, I was referring to Sapling. I know even less about Jujutsu than I do about Sapling! > > presumably works on the git object model under the hood > > There's no guarantee of this ... but they reserve the right to change that Interesting. So it would translate between them whenever you push to or pull from a G…

> Oh, I was referring to Sapling. I know even less about Jujutsu than I do about Sapling! I was just remarking about Jujutsu, in the case that it was important to you for some reason whether or not your VCS called out to Git. > Interesting. So it would translate between them whenever you push to or pull from a Git repo? To be honest, I don't know. I suspect that, for now, they store real Git objects, rather than tran…

I see, thanks for the thorough explanation!

Re: Sapling: A new source control system with Git-compatible client

#490
post #354

Does it support commit signing? I spent a while reading the website and couldn't find anything suggesting it does. Lack of that is a showstopper for me (and frankly, should be a showstopper for anyone).

There is a distinct lack of decent identity management/security in all of the version control systems I've used. It's a hard problem to solve, especially in a distributed/decentralized system (like git). Signing git-style commits is problematic in the face of merge conflicts or rebasing. A patch-style system (like Pijul) probably makes this easier: if everything is a patch, every patch can be signed atomically. I'd r…

If there's a "the remote", it's not a DVCS, and you can rely on ssh or whatever.
Post reply on HN