summaryrefslogtreecommitdiff
path: root/t/t7605-merge-resolve.sh
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2010-09-26 18:26:56 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-09-30 11:43:07 -0700
commitc099789bb01b810e40f9cfaa5c842ed568110fc8 (patch)
tree1a4b9a59bd1363fc47636b1b6a49a838f9377bad /t/t7605-merge-resolve.sh
parentdo not search functions for patch ID (diff)
downloadtgif-c099789bb01b810e40f9cfaa5c842ed568110fc8.tar.xz
diff: avoid repeated scanning while looking for funcname
For each hunk, xdl_find_func searches the preimage for a function name until the beginning of the file. If the file does not contain any function names, this search has complexity O(n^2) in the number of hunks n. Instead, inline xdl_find_func() and keep track of up to which line we have scanned already and the contents of the last funcname line that we have found. Noticed and a different approach proposed by Clemens Buchacher. This alternative solution was done by René Scharfe. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7605-merge-resolve.sh')
0 files changed, 0 insertions, 0 deletions