diff options
author | Paul Mackerras <paulus@samba.org> | 2008-10-21 10:18:12 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-10-21 10:18:52 +1100 |
commit | d375ef9b1483c3c828d78ce08adae6aae8e19f75 (patch) | |
tree | 6738a05155dab5982be6333f3e0132d8bb1ec1f6 /builtin-diff-tree.c | |
parent | gitk: Regenerate .po files (diff) | |
download | tgif-d375ef9b1483c3c828d78ce08adae6aae8e19f75.tar.xz |
gitk: Turn short SHA1 names into links too
This changes the link detection logic to accept strings of between 6
and 40 hex characters as a possible SHA1 ID of another commit, rather
than insisting on seeing the full 40 hex characters.
To make the logic that turns a possible link into an actual link work
with abbreviated IDs, this changes the way the commitinterest array is
used, and puts the code that deals with it in a pair of new functions.
The commitinterest array is now indexed by just the first 4 characters
of the interesting SHA1 ID, and each element is a list of id + command
pairs. This also pulls out the logic for expanding an abbreviated
SHA1 to the list of matching full IDs into its own function (the way
it is done is still the same slow way it was done before, which should
be improved some day).
This also fixes the bug where clicking on a link would take you to the
wrong commit if the line number of the target had changed since the
link was made.
This is based on a patch by Linus Torvalds, but totally rewritten by me.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'builtin-diff-tree.c')
0 files changed, 0 insertions, 0 deletions