From: Phillip Wood <phillip.wood123@gmail.com>
To: Denton Liu <liu.denton@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] git-diff.txt: document return code of `--no-index`
Date: Wed, 30 Oct 2019 10:11:08 +0000 [thread overview]
Message-ID: <4548d037-3fc5-b625-b7f9-646392392d0c@gmail.com> (raw)
In-Reply-To: <ed9f16c30a0f3852abaf0053d8c2b4a0ecd12f01.1572367897.git.liu.denton@gmail.com>
Hi Denton
The description is good, but the patch has a typo
On 29/10/2019 16:54, Denton Liu wrote:
> Within diff_no_index(), we have the following:
>
> revs->diffopt.flags.exit_with_status = 1;
>
> ...
>
> /*
> * The return code for --no-index imitates diff(1):
> * 0 = no changes, 1 = changes, else error
> */
> return diff_result_code(&revs->diffopt, 0);
>
> Which means when `git diff` is run in `--no-index` mode, `--exit-code`
> is implied. However, the documentation for this is missing in
> git-diff.txt.
>
> Add a note about how `--exit-code` is implied in the `--no-index`
> documentation to cover this documentation blindspot.
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
> Thanks for the review, Dscho. I guess it slipped my mind that we could
> write it this way too. Oops!
>
> Documentation/git-diff.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
> index 72179d993c..56b396ef81 100644
> --- a/Documentation/git-diff.txt
> +++ b/Documentation/git-diff.txt
> @@ -36,7 +36,7 @@ two blob objects, or changes between two files on disk.
> running the command in a working tree controlled by Git and
> at least one of the paths points outside the working tree,
> or when running the command outside a working tree
> - controlled by Git.
> + controlled by Git. This form implies `--no-exit`.
s/--no-exit/--exit-code/
Best Wishes
Phillip
>
> 'git diff' [<options>] --cached [<commit>] [--] [<path>...]::
>
>
next prev parent reply other threads:[~2019-10-30 10:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 8:19 [PATCH] git-diff.txt: document return code of `--no-index` Denton Liu
2019-10-29 13:06 ` Johannes Schindelin
2019-10-30 2:08 ` Junio C Hamano
2019-10-29 16:54 ` [PATCH v2] " Denton Liu
2019-10-30 10:11 ` Phillip Wood [this message]
2019-10-30 22:02 ` Johannes Schindelin
2019-10-30 22:12 ` Denton Liu
2019-10-30 18:06 ` [PATCH v3] " Denton Liu
2019-11-02 4:17 ` 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=4548d037-3fc5-b625-b7f9-646392392d0c@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liu.denton@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).