huanting / gitiles

Automatically exported from code.google.com/p/gitiles
0 stars 0 forks source link

[blame] links should show blame for parent of the commit. #64

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. open e.g 
https://chromium.googlesource.com/chromium/src/+blame/ce6f591cf3cd7fe9c4a2cf40ff
a9f70db20d2865/printing/backend/cups_helper.cc
2. click [blame] link on line 1

Result: same blame page.

Expected: blame page for revision just before the commit for line "1"
Particularly here 
https://chromium.googlesource.com/chromium/src/+blame/30b33994dbd7d1e7b28725eab3
cb098dcf8ceca9/printing/backend/cups_helper.cc

Original issue reported on code.google.com by vitalyb...@chromium.org on 17 Sep 2014 at 6:43

GoogleCodeExporter commented 8 years ago
I was looking at this a bit. The specific thing I'm normally looking for is 
"walk to the next oldest version of this file, to try to figure out when/how 
this code broke."

I was trying to figure out using the example above what the correct thing to do 
is.

The parent of ce6f591c according to ce6f591c^ is 30b33994 (which is what the 
example above suggests).

But viewing ce6f591c in `git gui blame` and using "Blame Parent Commit" sends 
me to a32b5656, but I'm not sure why, or which one is preferable.

Original comment by scottmg@chromium.org on 5 Feb 2016 at 7:56

GoogleCodeExporter commented 8 years ago
Ah, I think `git gui blame` blames the parent of the "originally by" commit. So:

ce6f591c was deemed a "move or copy" for line 1.
Originally, it was 203fb82c.

And 203fb82c^ is a32b5656, which is where git gui blame goes.

I wonder if 203fb82c is readily available to gitiles.

Original comment by scottmg@chromium.org on 5 Feb 2016 at 8:05

GoogleCodeExporter commented 8 years ago
(Oh, gitiles is open source. I'll see if I can wield my non-existent Java 
skillz towards answering the questions above...)

Original comment by scottmg@chromium.org on 5 Feb 2016 at 9:46

GoogleCodeExporter commented 8 years ago
I put a CL here https://gerrit-review.googlesource.com/c/74630/ to do this. I'm 
not entirely sure if it's exactly what we want for walking history, but it does 
what was proposed in #0 at least.

Original comment by scottmg@chromium.org on 5 Feb 2016 at 11:30