From: Junio C Hamano <gitster@pobox.com>
To: "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "D. Ben Knoble" <ben.knoble@gmail.com>,
Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH v2] doc: git-diff: rewrite EXAMPLES section
Date: Thu, 05 Nov 2026 08:46:59 -0800 [thread overview]
Message-ID: <xmqq33tfxm2k.fsf@gitster.g> (raw)
In-Reply-To: <pull.2293.v2.git.1793893217889.gitgitgadget@gmail.com> (Julia Evans via GitGitGadget's message of "Thu, 05 Nov 2026 15:40:17 +0000")
"Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:
> +-git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
> ++git diff [<options>] --staged [--merge-base] [<commit>] [--] [<path>...]
This goes against what you said earlier, which was
> - Mention both `git diff --staged` and `git diff --cached`, because
> "staged" is the term the Git user interface uses and several users
> said they find it easier to understand. Add an entry for --staged
> saying that it's a synonym. Like with `git switch`, and `git checkout`
> it's useful to leave the older version for folks who are used to using
> `git diff --cached` since we've seen that many people who are used to
> using a command don't see any value in changing how they use it.
Perhaps (--cached|--staged) or have two lines (i.e., turn the range
diff into
> + git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
> ++git diff [<options>] --staged [--merge-base] [<commit>] [--] [<path>...]
or something).
> +@@ Documentation/git-diff.adoc: files on disk.
> + do not give _<commit>_, it defaults to `HEAD`.
> + If `HEAD` does not exist (e.g. unborn branches) and
> + _<commit>_ is not given, it shows all staged changes.
> +- `--staged` is a synonym of `--cached`.
> ++ `--cached` is a synonym of `--staged`.
And this is the other way around.
Other than that, the rest, including the resurrection of AUTO_MERGE,
looked OK.
next prev parent reply other threads:[~2026-11-05 16:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 15:33 [PATCH] doc: git-diff: rewrite EXAMPLES section Julia Evans via GitGitGadget
2026-11-03 17:16 ` Julia Evans
2026-11-03 19:44 ` Junio C Hamano
2026-11-03 19:52 ` Julia Evans
2026-11-03 20:33 ` Junio C Hamano
2026-11-03 20:45 ` Julia Evans
2026-11-03 21:42 ` Junio C Hamano
2026-11-05 15:40 ` [PATCH v2] " Julia Evans via GitGitGadget
2026-11-05 16:46 ` Junio C Hamano [this message]
2026-11-05 18:18 ` Junio C Hamano
2026-11-05 17:23 ` Tuomas Ahola
2026-11-05 19:45 ` Junio C Hamano
2026-11-05 19:46 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq33tfxm2k.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=julia@jvns.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.