Re: [PATCH v4 08/10] builtin/diff-index: learn --merge-base
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Sep 29, 2020, 19:53 UTC
- Message-ID
- <CAN0heSqr4_orRR5BD53hoaykd26ZBrfZgQ8PR2WdyZTOwNh6GA@mail.gmail.com>
- In-Reply-To
- <f54baa4ecd495026c2fce1772b560b7bbbeecc04.1600600823.git.liu.denton@gmail.com>
Hi Denton,
On Sun, 20 Sep 2020 at 13:24, Denton Liu <liu.denton@gmail.com> wrote:
> --- a/Documentation/git-diff-index.txt > +++ b/Documentation/git-diff-index.txt
> +--merge-base:: > + Instead of comparing <tree-ish> directly, use the merge base > + between <tree-ish> and HEAD instead. <tree-ish> must be a > + commit.
If you end up rerolling this patch series for other reasons, you might want to consider using `backticks` around `<tree-ish>` and `HEAD` so they get typeset as monospace.
Show 7 quoted lines
> 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. > ++ > +If --merge-base is given, instead of using <commit>, use the merge base > +of <commit> and HEAD. `git diff --merge-base A` is equivalent to > +`git diff $(git merge-base A HEAD)`.
Similarly here. (I realize there are existing offenders. I think it's fine or even preferable to leave them as they are so that you don't get lost in a huge while-at-it.) This also applies to the next patch which touches git-diff-tree.txt.
Martin