News for hackers. Stuff that matters.
Re:I (kind of) killed Mercurial at Mozilla by guenthert on Wednesday November 22, 2023 @04:29PM (#38385394)
It sadly clobbers your working tree. Not calling that checkout doesn't make it any better. Nothing other than checkout ought to change the working tree -- is that too much to ask?
Re:I (kind of) killed Mercurial at Mozilla by acdha on Wednesday November 22, 2023 @08:51PM (#38388195)
How does it clobber your working tree? You’ll get an error if there are any conflicts.
Re:I (kind of) killed Mercurial at Mozilla by guenthert on Thursday November 23, 2023 @05:26AM (#38391310)
Yes, sorry, that was poor writing style. Git does indeed warn you that it would clobber your working tree and suggests that you do it in its behalf (the stash/pop dance).

Why is the user exposed to that? If git needs those files checked out for the merge, does it really have to be in the working tree? Why not in a hidden, ephemeral subdirectory? Leave my working tree alone, I say!

Re:I (kind of) killed Mercurial at Mozilla by glandium on Wednesday November 22, 2023 @05:09PM (#38385865)
There are plenty other commands that change the working tree. rebase, cherry-pick, revert, merge, etc. Are you suggesting that all these should be done by checkout?

pull is fetch + rebase or merge. You can use fetch instead of pull if you prefer. Or `git remote update`, for that matter.