From: Jeff King <peff@peff.net>
To: Eckhard Maass <eckhard.maass@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: -B option of git log
Date: Thu, 21 Feb 2013 19:57:04 -0500 [thread overview]
Message-ID: <20130222005704.GA24287@sigill.intra.peff.net> (raw)
In-Reply-To: <5126BF50.6020500@gmx.net>
On Fri, Feb 22, 2013 at 01:44:00AM +0100, Eckhard Maass wrote:
> Let me get a setup:
>
> $> git init .
> Initialized empty Git repository in /tmp/t2/.git/
> $> echo 'Lorem ipsum doler sed. Lorem ipsum doler sed. Lorem ipsum doler
> sed. Lorem ipsum doler sed.' > a
> $> git add a
> $> git commit -m 'Init.'
> [master (root-commit) b78205c] Init.
> 1 file changed, 1 insertion(+)
> create mode 100644 a
> $> mv a b
> $> echo 'new' > a
> $> git add -A .
> $> git commit -m '2nd.'
> [master a30ca49] 2nd.
> 2 files changed, 2 insertions(+), 1 deletion(-)
> create mode 100644 b
>
> Now, I get the following:
>
> $> git log --oneline -B20%/80% -M20% --name-status
> a30ca49 2nd.
> M a
> A b
> b78205c Init.
> A a
>
> But I would expect that git-log shows me a rename from a to b and a new a.
I think the problem is that your test file is so tiny that it falls
afoul of git's MINIMUM_BREAK_SIZE heuristic of 400 bytes (which prevents
false positives on tiny files). Try replacing your "Lorem ipsum" echo
with something like "seq 1 150", and I think you will find the result
you are expecting.
-Peff
next prev parent reply other threads:[~2013-02-22 0:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 0:44 -B option of git log Eckhard Maass
2013-02-22 0:57 ` Jeff King [this message]
2013-02-22 10:14 ` Eckhard Maass
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=20130222005704.GA24287@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=eckhard.maass@gmx.net \
--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).