All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: gitster@pobox.com
Cc: peff@peff.net, git@vger.kernel.org, Brandon Casey <drafnel@gmail.com>
Subject: [PATCH 1/2] t7508: demonstrate status's failure to use --porcelain format with -z
Date: Thu, 26 May 2011 13:43:20 -0700	[thread overview]
Message-ID: <vdMu20HxiNaWL_IogfamtfZCd6xRyKanIqTSw0k4f2SrbLfUYHDzKT2EGkwdFRlaLzX-5vGGtDCZRGu84HrJzw@cipher.nrlssc.navy.mil> (raw)

From: Brandon Casey <drafnel@gmail.com>

When 'git status' is supplied the -z switch, and no output format has been
selected, it is supposed to use the --porcelain format.  This does not
happen.  Instead, the standard long format is used.  Add a test to
demonstrate this failure.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t7508-status.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index cd6e2c5..9601258 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -533,6 +533,13 @@ test_expect_success 'status --porcelain ignores -b' '
 
 '
 
+test_expect_failure 'status -z implies porcelain' '
+	echo " M dir1/modifiedQA  dir2/addedQ?? dir1/untrackedQ?? dir2/modifiedQ?? dir2/untrackedQ?? expectQ?? outputQ?? untrackedQ" |
+		q_to_nul | tr -d "\\012" >expect &&
+	git status -z >output &&
+	test_cmp expect output
+'
+
 cat >expect <<\EOF
 # On branch master
 # Changes to be committed:
-- 
1.7.4.4

             reply	other threads:[~2011-05-26 20:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 20:43 Brandon Casey [this message]
2011-05-26 20:43 ` [PATCH 2/2] builtin/commit.c: set status_format _after_ option parsing Brandon Casey
2011-05-26 21:17   ` Jeff King
2011-05-26 21:34     ` Brandon Casey
2011-05-26 21:45 ` [PATCH 1/2] t7508: demonstrate status's failure to use --porcelain format with -z Junio C Hamano
2011-05-26 22:51   ` Brandon Casey
2011-05-26 23:31     ` 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=vdMu20HxiNaWL_IogfamtfZCd6xRyKanIqTSw0k4f2SrbLfUYHDzKT2EGkwdFRlaLzX-5vGGtDCZRGu84HrJzw@cipher.nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.