From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: git-blame not tracking copies
Date: Wed, 2 May 2007 20:33:23 +0100 [thread overview]
Message-ID: <200705022033.25885.andyparkins@gmail.com> (raw)
Hello,
During the discussion on the ffmpeg list about potential migration to
git the following came up. It seems like a bug to me, so I said I
would raise it here.
This is the output of a test script (which I can supply if wanted, but
you can guess the content from the output.
Initialized empty Git repository in .git/
----- echo ABC to commit 1
Created initial commit beb7140: 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 newtest
----- echo DEF to commit 2
Created commit 207f5a3: 2
1 files changed, 1 insertions(+), 0 deletions(-)
----- echo ghijk to commit 3
Created commit 14abf8c: 3
1 files changed, 1 insertions(+), 0 deletions(-)
----- Blame 1...
^beb7140 (Andy Parkins 2007-05-02 20:25:27 +0100 1) ABC
207f5a35 (Andy Parkins 2007-05-02 20:25:27 +0100 2) DEF
14abf8ce (Andy Parkins 2007-05-02 20:25:27 +0100 3) ghijk
----- Copy newtest to newtest2, commit 4
Created commit 48861ce: 4
1 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 newtest2
----- Blame 2...
48861ced (Andy Parkins 2007-05-02 20:25:27 +0100 1) ABC
48861ced (Andy Parkins 2007-05-02 20:25:27 +0100 2) DEF
48861ced (Andy Parkins 2007-05-02 20:25:27 +0100 3) ghijk
----- Edit newtest2, commit 5
Created commit 2d2ec0f: 5
1 files changed, 1 insertions(+), 0 deletions(-)
----- Blame 3...
^beb7140 newtest (Andy Parkins 2007-05-02 20:25:27 +0100 1) ABC
207f5a35 newtest (Andy Parkins 2007-05-02 20:25:27 +0100 2) DEF
2d2ec0f0 newtest2 (Andy Parkins 2007-05-02 20:25:27 +0100 3) XXXX
48861ced newtest2 (Andy Parkins 2007-05-02 20:25:27 +0100 4) ghijk
All git-blame commands are "git-blame -C1 -C1"
The issues are
- Blame2 says all the lines come from commit 4, when actually they
come from commits 1, 2 and 3. It was pointed out that this is
particularly annoying because the file is an exact copy and so the
copy has the same hash as the original so should be easy to spot
- The output isn't stable, even if blame2 had a good reason for not
assigning lines 1 and 2 to their correct commits, why isn't the same
true in blame3?
- Blame3 incorrectly ascribes line 4 to commit 4, when it should have
remained as it was in blame1 - to commit 3.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next reply other threads:[~2007-05-02 19:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 19:33 Andy Parkins [this message]
2007-05-02 23:42 ` git-blame not tracking copies Junio C Hamano
2007-05-03 7:29 ` Andy Parkins
2007-05-06 6:02 ` 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=200705022033.25885.andyparkins@gmail.com \
--to=andyparkins@gmail.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).