|
|
|
|
|
by ozim
7 days ago
|
|
That’s something I have the same thoughts on, because long time ago I used CVS/SVN and staging area with stashing was exactly the answer for what you wrote. Combined with stashing you can quickly build to see if the commit builds. Git supports all of it and people and jj are just complicating it by “let’s skip all of that and make a commit” because they don’t see it actually is simpler. I just see how in 5 years someone who would be used only to jj will come over and re-invent staging and stashing “because I want changes but I don’t want to make a commit”. |
|
And a staging area is arguably the more error-prone and less ergonomic approach, giving rise to more UI complexity like git diff --cached, git diff HEAD, and plain git diff all being necessary functions. Or the git reset --soft/--mixed/--hard triad.
This ultimately results from the design decision that the staging area is a revision in all but name (it is a set of changes, after all), but cannot be addressed as one, so additional UI ceremony is needed. (See e.g. Mercurial and Sapling, both of which allow you to add and remove changes to and from the current commit, and thus avoid this unneeded complexity.)
[1] That git also uses the staging area for merges is a separate issue.