From: Wolfgang Rohdewald <wolfgang@rohdewald.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git blame --follow
Date: Tue, 15 Mar 2011 19:26:58 +0100 [thread overview]
Message-ID: <201103151926.58449.wolfgang@rohdewald.de> (raw)
In-Reply-To: <7vy64g9tqs.fsf@alter.siamese.dyndns.org>
On Dienstag 15 März 2011, Junio C Hamano wrote:
> Wolfgang Rohdewald <wolfgang@rohdewald.de> writes:
> > git log --follow filename
> >
> > shows the full history, while
> >
> > git blame --follow filename
> >
> > blames everything to the latest commit (which was
> > a file rename)
>
> Huh?
>
> $ git checkout master^0
> $ git mv COPYING RENAMING
> $ git commit -m renamed
> $ git blame --follow RENAMING
>
> gives everything blamed to 075b845a COPYING (but that is
> probably by accident, see below). FYI,
>
> $ git blame RENAMING
>
> should also blame everything to the same commit and the same
> COPYING file. If you get a different behaviour out of the
> above command sequence, there is something else going on.
I get the same - except that only most is attributed to 075b845a,
some is attributed to 703601d6. But git blame and git
blame --follow return the same output with your example
> I didn't know "blame" even accepted "--follow". It is
> entirely out of the scope of its design to take "--follow"
> option, as the "blame" command itself has its own and real
> "follow" logic that is enabled by default (i.e. it follows a
> whole file rename without any option)
so if I rename a parent directory of myfile and do git blame
myfile, blaming should ignore the renaming. This works
with the git repo
git mv xdiff xxx
git ci -m'mv xdiff xxx'
cd xxx
git blame xemit.c
But with my repository (which I cannot share),
this does not happen. git blame attributes everything to
the renaming commit. If I checkout the commit before, git
blame shows everything correctly.
So there must be something special with my repo. How could
I debug that? BTW the renaming happened in svn, it is the
last svn commit for this file before I imported this svn
repo into git (like described in the Pro Git book)
And - for directories below the renamed one git log --follow
cannot cross this barrier either but if the "follow" logic
is different I suppose this is not related
--
Wolfgang
next prev parent reply other threads:[~2011-03-15 18:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 15:44 git blame --follow Wolfgang Rohdewald
2011-03-15 17:30 ` Junio C Hamano
2011-03-15 18:26 ` Wolfgang Rohdewald [this message]
2011-03-17 9:59 ` Jakub Narebski
2011-03-17 10:16 ` Wolfgang Rohdewald
2011-03-17 16:47 ` Jakub Narebski
-- strict thread matches above, loose matches on Subject: below --
2012-09-06 7:02 norbert.nemec
2012-09-06 9:58 ` Jeff King
2012-09-06 10:12 ` norbert.nemec
2012-09-06 15:13 ` 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=201103151926.58449.wolfgang@rohdewald.de \
--to=wolfgang@rohdewald.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).