ok/jj
1
0
Fork 0
forked from mirrors/jj

docs: try to clarify that jj doesn't need a staging area

Wol on lwn.net pointed out that our current description in the Git
Comparison doc for why there is no staging area can be interpreted as
saying that it's because it simplifies the CLI. It took me a while to
see that interpretation, but it makes sense to me now. This patch
tries to clarify that we have better tools than the staging area for
manipulating commits.
This commit is contained in:
Martin von Zweigbergk 2024-01-20 13:44:24 -08:00 committed by Martin von Zweigbergk
parent 0bc1341fd0
commit 63c4de3cf7

View file

@ -17,10 +17,11 @@ various use cases.
* **The working copy is automatically committed.** That results in a simpler and * **The working copy is automatically committed.** That results in a simpler and
more consistent CLI because the working copy is now treated like any other more consistent CLI because the working copy is now treated like any other
commit. [Details](working-copy.md). commit. [Details](working-copy.md).
* **There's no index (staging area).** That also results in a simpler * **There's no index (staging area).** Because the working copy is automatically
CLI for similar reasons. The index is very similar to an intermediate commit committed, an index-like concept doesn't make sense. The index is very similar
between `HEAD` and the working copy, so workflows that depend on it can be to an intermediate commit between `HEAD` and the working copy, so workflows
modeled using proper commits instead. [Details](#the-index). that depend on it can be modeled using proper commits instead. Jujutsu has
excellent support for moving changes between commits. [Details](#the-index).
* **No need for branch names (but they are supported).** Git lets you check out * **No need for branch names (but they are supported).** Git lets you check out
a commit without attaching a branch. It calls this state "detached HEAD". This a commit without attaching a branch. It calls this state "detached HEAD". This
is the normal state in Jujutsu (there's actually no way -- yet, at least -- to is the normal state in Jujutsu (there's actually no way -- yet, at least -- to