From: Jeff King <peff@peff.net>
To: Matthew Rothenberg <mrothenberg@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Efficient parsing of `status -z` output
Date: Tue, 10 Mar 2015 01:41:47 -0400 [thread overview]
Message-ID: <20150310054146.GA3216@peff.net> (raw)
In-Reply-To: <CAMJduDvuBF6KwLjmnxmMgfeSYfO6uDVfnkF=VTLTr8t8qowb0w@mail.gmail.com>
On Mon, Mar 09, 2015 at 07:40:43PM -0400, Matthew Rothenberg wrote:
> On Mon, Mar 9, 2015 at 2:49 AM, Jeff King <peff@peff.net> wrote:
> > $ git init
> > $ seq 1 1000 >file && git add file && git commit -m base
> > $ mv file other
> > $ echo foo >file
> > $ git add .
> > $ git status --short
> > M file
> > C file -> other
>
> Fantastic, I am able to replicate with these steps and will build
> tests around this case.
>
> For future proofing, from the documentation for git status is appears
> the other two codes I would want to check for in addition to 'C '
> (which this test cases generates) may be 'CM' and 'CD'? And all of
> those should always have the additional PATH2 column present?
Yes, you can trivially make CM and CD by changing or deleting "other" in
the example above. I don't think you can ever have 'C' or 'R' in the
second column; we don't do renames on working tree changes, since a
"new" file there is simply untracked.
-Peff
prev parent reply other threads:[~2015-03-10 5:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 23:00 Efficient parsing of `status -z` output Matthew Rothenberg
2015-03-08 8:14 ` Junio C Hamano
2015-03-09 1:41 ` Matthew Rothenberg
2015-03-09 6:19 ` Jeff King
2015-03-09 6:49 ` Jeff King
2015-03-09 23:40 ` Matthew Rothenberg
2015-03-10 5:41 ` Jeff King [this message]
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=20150310054146.GA3216@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=mrothenberg@gmail.com \
/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).