]> git.ipfire.org Git - thirdparty/git.git/commit
gitk: fix the context menu not appearing in the presence of submodule diffs
authorРоман Донченко <dpb@corrigendum.ru>
Sun, 15 Dec 2019 18:25:50 +0000 (21:25 +0300)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 13 Apr 2020 05:11:18 +0000 (15:11 +1000)
commita99bc27aec74071aa1e9ecaa12c642e88e377165
treed4489e6d118b61bc8ffa9fad8ca68066816953e9
parent2faa6cdc5e4d1d5fd27512994f002fc2640b1949
gitk: fix the context menu not appearing in the presence of submodule diffs

Currently, submodule diffs can cause the diff context menu to fail
to appear because of a couple bugs in parseblobdiffline:

* it appends the submodule name to ctext_file_lines instead of
  a line number, which breaks the binary search in find_ctext_fileinfo;

* it can desynchronize ctext_file_names and ctext_file_lines
  by appending to the former but not the latter, which also breaks
  find_ctext_fileinfo.

Fix both of these.

Note: a side effect of this patch is that the context menu also
starts appearing when you right-click on submodule diffs (and not just
regular diffs). The menu is non-functional in this case, though,
since you can't run blame on submodules.

Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
gitk