committing some lines

Hartmut Goebel h.goebel at crazy-compilers.com
Mon Oct 2 06:55:38 UTC 2023


Am 27.09.23 um 19:19 schrieb Steve Fink:
> I can only really speak for myself, and I haven't used either magit or 
> monky, but maybe my opinion will have some value in knowing what 
> mercurial users tend to expect?

So I strongly suggest you give magit a try to get a notion of its 
benefits. Mitchel already pointed to the following intro to magit video 
can easily be listened to in double speed and if so is ~7 minutes.

https://www.youtube.com/watch?v=vQO7F2Q9DwA


>
> Mercurial doesn't have a staging area / index / cache, and I don't 
> miss it.

I miss it a lot, since it makes it much harder to split the current 
state of the working directory into smaller pieces.

Maybe a top-level commit which get amended (as you mention in your other 
post) can work like a staging area. Actually I don't care about how this 
is solved, as long a tooling is powerful — and this is what mercurial is 
lacking,

"hg commit --interactive" works per-chunk only — which is not 
fine-grained enough for my needs. And the ncurses interface available 
for "hg commit --interactive" is, well, has potential for improvement.


>  Which means you need to individually identify the files or chunks 
> that you want to include, and anything you don't identify gets left 
> behind.

Is is wrong: You can just use "git commit -a" to commit all changes in 
one rush. Yes. you need to add a flag, but that's all.

> Hg is the opposite: the default is to take everything, or at least 
> everything that has been identified as belonging in the repository.

And this often leads to commits including unrealated changes.


> The other relevant default is that git treats commits as permanent and 
> immutable. In hg, the revision hash does refer to a permanent and 
> immutable thing, but your current commit stack can be updated and 
> evolved and modified.

Again, this is not true: In both mercurial and git commits are permanent 
and immutable. And the commit stack can be updated and modified in both 
— an in git this not even requires an extension, but is already build in.


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          |h.goebel at crazy-compilers.com                |
|www.crazy-compilers.com  | compilers which you thought are impossible |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20231002/74a6e3ec/attachment.html>


More information about the Mercurial mailing list