3 ms·
Mercurial does have a staging area. It just defaults to including all previously-committed files, which IMHO is very sensible. Link to my previous comment on it
by doubleunplussed 7y ago
Mercurial does have a staging area. It just defaults to including all previously-committed files, which IMHO is very sensible. Link to my previous comment on it:
https://news.ycombinator.com/item?id=21393972 https://news.ycombinator.com/item?id=21393972
- jcranmer 7y agoWhat you describe is not a staging area, it is an interactive commit. And, personally, I see no positive value in a staging area, given that you can achieve the same functionality via interactive commits or amending commits.
- doubleunplussed 7y agoAh, fair enough. So I suppose git's staging area has the additional benefit that you can stage some things and then shut your computer down and the staging will be there when you come back. I have no idea whether tortoisehg remembers the state of what you've selected in its 'interactive commit' GUI, because I've only ever made those decisions when committing. Given I've been using it almost daily for about six years on a community project (i.e. not just linear commits by a single dev who doesn't need to care about anyone else), I think this is also evidence that a persistent staging area isn't super important.
- gpderetta 7y agostaging interacts with other commands as well. You can stage a bunch of stuff then revert or stash the rest, you can stash everything in the staging area, you can diff only stuff in the staging area and so on. It basically acts as a clipboard. Possibly hg interactive commits work in the same way, but then I do not know how that would be different from a staging area.
- pseudalopex 7y agoUsing commits for staging needs fewer different commands and prevents accidentally resetting or discarding changes.