git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Matthew Rothenberg <mrothenberg@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Efficient parsing of `status -z` output
Date: Mon, 9 Mar 2015 02:19:20 -0400	[thread overview]
Message-ID: <20150309061920.GB27128@peff.net> (raw)
In-Reply-To: <CAMJduDvDO4GesL+eru3h1YHrbF5hFmyycX3f4ADQOo+VnD7GDg@mail.gmail.com>

On Sun, Mar 08, 2015 at 09:41:08PM -0400, Matthew Rothenberg wrote:

> I see, thank you. But how would one ever get a copy operation to show
> up in the output of `git status -z` to begin with? It appears copies
> are only detected in `diff` and `show`, can be forced with the
> --find-copies-harder option, but that `git status` does not appear to
> take that option nor detect copies in any way that I can get it to
> replicate and output that status code to me... a test case would be
> great if you know one, thanks!

We don't turn on copy-detection in "git status" by default (only rename
detection), and I think you are right that there is currently no way to
turn it on manually. However, it would probably be sensible to handle
"C" diffs in your parser, if only to future-proof against a day when
that changes (and because it should fairly trivial once you build "R"
support).

I don't know if anybody is actively working on such a change, but
somebody expressed interest recently-ish:

  http://thread.gmane.org/gmane.comp.version-control.git/260381

-Peff

  reply	other threads:[~2015-03-09  6:19 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 [this message]
2015-03-09  6:49       ` Jeff King
2015-03-09 23:40         ` Matthew Rothenberg
2015-03-10  5:41           ` 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=20150309061920.GB27128@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).