News for hackers. Stuff that matters.
Re:Ask HN: Git Alternatives – Sapling vs. Jj by aseipp on Tuesday December 10, 2024 @12:47PM (#42379183)
The command line interface for Sapling called `sl`, which is Git compatible, is fully supported by the team at Meta. You can file bugs and feature requests, etc, though the repository is a bit intimidating. It is only the non-Git server components (Mononoke, EdenFS) that are not yet really supported [1] but I think most people aren't really concerned with that, when writing a post like this.

For all intents and purposes, Sapling works very well, I think, and in some places it has a lot more polish, like the "isl" graphical interface, which makes things like rebasing and restacking incredibly intuitive even for new users. (I consider isl to be a significant advantage over Jujutsu, and I say that as a Jujutsu developer!)

[1] Though, Mononoke does support features like exporting Git repositories to remote hosts from the internal model; that's not really what people are looking for in a lot of cases though.

Re:Ask HN: Git Alternatives – Sapling vs. Jj by IshKebab on Tuesday December 10, 2024 @01:30PM (#42379712)
What's the advantage of using Sapling as an alternative Git frontend?
Re:Ask HN: Git Alternatives – Sapling vs. Jj by aseipp on Tuesday December 10, 2024 @02:04PM (#42380176)
You don't need to manage the stash or index, those are just expressed as commits, so you have fewer commands and a simpler UX, and can use universal tools like 'split' to handle cases you'd otherwise need stash/apply/switch to handle.

It supports Mercurial-like "revsets", so it is easy and flexible to query the commit graph for all kinds of information, in a user-controlled way.

Features like 'sl absorb' can do git 'fixup commits' automatically.

It supports a notion of changeset evolution, so if you have `A -> B -> C` and `A` gets merged into main, it will automatically rebase `B -> C` on top (among other things).

"isl", the "interactive sapling" GUI, is absolutely stellar and I don't think there's a faster way to do tasks like 'rebase X onto Y' or "reorder commits in stack Y" than that, even with Jujutsu.

It comes with integration for a tool named ReviewStack so you can do stacked code reviews while working on GitHub.

There is an undo command to undo your mistakes.

And, while I'm not sure this is in the Git backend today, many algorithms like getting the history of a file are O(N) in terms of file history as to the history of the whole repo (e.g. try `git log file` in gecko-dev or Linux and it is slow.)

Many of these advantages (not all) are shared with Jujutsu, to be clear.

Re:Ask HN: Git Alternatives – Sapling vs. Jj by keybored on Tuesday December 10, 2024 @03:25PM (#42381044)
> You don't need to manage the stash or index, those are just expressed as commits,

You can also avoid managing the stash in Git. By not using it.

Re:Ask HN: Git Alternatives – Sapling vs. Jj by martinvonz on Tuesday December 10, 2024 @03:30PM (#42381096)
But you still need to deal with a dirty working copy somehow. This blog post from today happens to describe one scenario where it's nice not to have to worry about changes in the working copy:

https://drewdevault.com/2024/12/10/2024-12-10-Daily-driving-...

Re:Ask HN: Git Alternatives – Sapling vs. Jj by CRConrad on Wednesday December 18, 2024 @03:55AM (#42449040)
Seems to have been deleted: "404 Page not found".
Re:Ask HN: Git Alternatives – Sapling vs. Jj by GauntletWizard on Tuesday December 10, 2024 @02:36PM (#42380538)
Just the name makes it a no-go for me, it would interfere with my favorite command-line utility, `sl` - Steam Locomotive

https://github.com/mtoyoda/sl

Re:Ask HN: Git Alternatives – Sapling vs. Jj by h1x on Wednesday December 11, 2024 @12:37AM (#42385107)
> The command line interface for Sapling called `sl` [...]

This is a really unfortunate choice of the binary name - it collides with a classic UNIX utility. I use it everyday and it would be very annoying for the program to do something unexpected.

Edit: apt install sl

Re:Ask HN: Git Alternatives – Sapling vs. Jj by aitchnyu on Wednesday December 11, 2024 @03:21AM (#42385877)
The package name will be sl-vcs like chromium-browser