From: Jeff King <peff@peff.net>
To: Olivier Galibert <galibert@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Could git status know about -M ?
Date: Fri, 30 Mar 2007 00:19:24 -0400 [thread overview]
Message-ID: <20070330041923.GA9320@coredump.intra.peff.net> (raw)
In-Reply-To: <20070330000949.GB41089@dspnet.fr.eu.org>
On Fri, Mar 30, 2007 at 02:09:49AM +0200, Olivier Galibert wrote:
> Right now git status shows renames only if the deleted file is
> strictly identical to the added file. If you do an even minor
> modification (say, change a "" include to a <> one) it becomes a
> del/add pair which is way less readable. Easily fixable?
It uses the same rename detection as git-diff, which computes a
similarity score. For example, try this:
$ git init
$ head -n 1000 /usr/share/dict/words >foo
$ git-add foo; git-commit -m 'added file'
$ git-mv foo bar
$ git-status ;# shows rename because files are identical
$ echo changes >>bar; git-add bar
$ git-status ;# still shows rename because files are similar
$ echo rewrite >bar; git-add bar
$ git-status ;# now files are too dissimilar to find rename
My guess is that your changes, even though they seem small, or
preventing the rename detection from working. If you have a very small
file, even a few changes can make the files too dissimilar.
-Peff
prev parent reply other threads:[~2007-03-30 4:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-30 0:09 Could git status know about -M ? Olivier Galibert
2007-03-30 4:19 ` 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=20070330041923.GA9320@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=galibert@pobox.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).