From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: "Peter Valdemar Mørch (Lists)" <4ux6as402@sneakemail.com>
Subject: Re* git diff/log --check exitcode and PAGER environment variable
Date: Fri, 08 Aug 2008 03:15:43 -0700 [thread overview]
Message-ID: <7v1w0zersg.fsf_-_@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vfxpfet8a.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 08 Aug 2008 02:44:37 -0700")
As this is not limited to diff command at all, let's do this instead.
-- >8 --
Document use of pager means you will see exit code from the pager
Whenever we run pager (either a subcommand that implies use of pager by
default, or by explicit request with "git -p cmd"), the main git process
becomes the upstream of the pipe that feed the pager, and the exit code
from the command as a whole comes from the pager. Long time users may
have already got used to this without being documented, but it should be
documented.
We may be swapping the process ordering in the future so that the exit
code from the main git process is always exposed, and at that point this
comment should be removed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/git.txt | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index b1cb972..d6ca400 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -150,7 +150,9 @@ help ...`.
-p::
--paginate::
- Pipe all output into 'less' (or if set, $PAGER).
+ Pipe all output into 'less' (or if set, $PAGER). Note that this
+ implies that the exit code you see from the command will be that
+ of the pager, not git.
--no-pager::
Do not pipe git output into a pager.
next prev parent reply other threads:[~2008-08-08 10:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 9:39 git diff/log --check exitcode and PAGER environment variable "Peter Valdemar Mørch (Lists)"
2008-08-08 9:44 ` Junio C Hamano
2008-08-08 10:04 ` "Peter Valdemar Mørch (Lists)"
2008-08-08 10:15 ` Junio C Hamano [this message]
2008-08-08 11:02 ` Re* " "Peter Valdemar Mørch (Lists)"
2008-08-08 11:23 ` Johannes Schindelin
2008-08-08 20:40 ` Junio C Hamano
2008-08-09 6:57 ` [PATCH] Teach git log --check to return an appropriate error code Peter Valdemar Mørch
2008-08-09 12:05 ` Johannes Schindelin
2008-08-09 19:29 ` Junio C Hamano
2008-08-10 17:05 ` "Peter Valdemar Mørch (Lists)"
2008-08-10 18:40 ` Junio C Hamano
2008-08-09 18:58 ` Junio C Hamano
2008-08-11 6:46 ` PATCH v2 0/2 Trying patch again Peter Valdemar Mørch
2008-08-11 6:46 ` [PATCH v2 1/2] Teach git log --check to return an appropriate exit code Peter Valdemar Mørch
2008-08-11 6:46 ` [PATCH v2 2/2] Teach git log --exit-code " Peter Valdemar Mørch
2008-08-08 13:17 ` git diff/log --check exitcode and PAGER environment variable Jeff King
2008-08-08 13:19 ` Jeff King
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=7v1w0zersg.fsf_-_@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=4ux6as402@sneakemail.com \
--cc=git@vger.kernel.org \
/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).