Commit 9712b81
committed
gitk: Fix bugs in blaming code
The "show origin of this line" function wasn't working when gitk was
run in a subdirectory, since it passed the path relative to the
top-level directory to git blame. This fixes it by passing the
absolute path to the file instead of the relative path.
The same problem occurs when running git gui blame, except that
git gui blame appears not to be able to accept an absolute path to the
file, so we make a relative path using a new [make_relative] function.
Finally, this fixes a bug in [show_line_source] where we weren't
setting id, resulting in an error when trying to find the origin of
a line in the fake commit for local changes not checked in, when its
parent was a real commit (i.e. there were no changes checked in).
Signed-off-by: Paul Mackerras <paulus@samba.org>1 parent 7fb0abb commit 9712b81
1 file changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3318 | 3318 | | |
3319 | 3319 | | |
3320 | 3320 | | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
3321 | 3340 | | |
3322 | | - | |
| 3341 | + | |
3323 | 3342 | | |
3324 | 3343 | | |
3325 | 3344 | | |
| |||
3338 | 3357 | | |
3339 | 3358 | | |
3340 | 3359 | | |
3341 | | - | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
3342 | 3366 | | |
3343 | 3367 | | |
3344 | 3368 | | |
| |||
3382 | 3406 | | |
3383 | 3407 | | |
3384 | 3408 | | |
| 3409 | + | |
| 3410 | + | |
3385 | 3411 | | |
3386 | 3412 | | |
3387 | 3413 | | |
| |||
3398 | 3424 | | |
3399 | 3425 | | |
3400 | 3426 | | |
3401 | | - | |
| 3427 | + | |
3402 | 3428 | | |
3403 | 3429 | | |
3404 | 3430 | | |
| |||
0 commit comments