author | Paul Mackerras <paulus@samba.org> | |
Sat, 6 Dec 2008 10:44:05 +0000 (21:44 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sat, 6 Dec 2008 10:44:05 +0000 (21:44 +1100) | ||
commit | 9712b81a765978d2770b32bb77d25bfbf05d5eb5 | |
tree | bcaa9ea929fa4322f1063ec002e89dec7ffafcbe | tree | snapshot |
parent | 7fb0abb19563d36d8e210198b6c2debbf3362812 | commit | diff |
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>
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>
gitk | diff | blob | history |