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

Brandon Casey <casey@nrlssc.navy.mil> writes:

> 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>

I didn't even know we attempted to default to porcelain when -z is given,
even though it is a logical thing to do in the sense that nobody sane
would want to read a NUL-terminated human readable format.

I'll rewrite the test to avoid hardcoded and context dependent
test vector, like this:

    test_expect_failure 'status -z implies porcelain' '
           git status --porcelain |
           perl -pe "s/\012/\000/g" >expect
           git status -z >output &&
           test_cmp expect output
    '

as the only thing you are interested in is the two output to match
identically modulo the record termination.

By the way, don't we however also want to make sure -z does not kick in
automatically when other options like "short" or "normal" is given?

  parent reply	other threads:[~2011-05-26 21:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 20:43 [PATCH 1/2] t7508: demonstrate status's failure to use --porcelain format with -z Brandon Casey
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 ` Junio C Hamano [this message]
2011-05-26 22:51   ` [PATCH 1/2] t7508: demonstrate status's failure to use --porcelain format with -z 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=7v4o4hw2zm.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --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.