[Insight-developers] Odd git behavior with code reversion.

M Stauffer (V) mstauff at verizon.net
Thu Sep 29 13:44:15 EDT 2011


>> So in the case I described, do you think git blame purposely show the
>> original commit because the line that's currently in the file is the
>> same as it was in that original commit, even though it changed
>> inbetween?
>
>The change in this case was *adding* lines and then *removing* the same
>lines.  No other lines changed.  Therefore the lines in the current
>version look exactly like they did before the change was ever made.
>As a result 'git blame' shows when they were originally written.

OK, that's what I figured, thanks. I wonder if that's by design or not.
It's a little misleading since
the line actually was changed in some way since the original commit. On
the other hand, since it was changed back, it's also relevant to see
when it was first added.

>If you do just "git log -- path/to/file.hxx" that will show all the
>commits that changed the file.

Yeah that's what I did eventually to see where it had changed again.

-M



More information about the Insight-developers mailing list