summaryrefslogtreecommitdiff
path: root/tests/diff/diffiter.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2015-12-16 12:30:52 +0100
committerVicent Marti <tanoku@gmail.com>2015-12-16 12:30:52 +0100
commit879ebab314fe60cc737d436f62f190260ce13c1a (patch)
tree41d1fd8db670d5649959009eb6052da53595b932 /tests/diff/diffiter.c
parent7f2c1469f8565fa8809c03aa7aa0ffae90a99c66 (diff)
downloadlibgit2-879ebab314fe60cc737d436f62f190260ce13c1a.tar.gz
merge: Use `git_index__fill` to populate the indexvmg/index-fill
Instead of calling `git_index_add` in a loop, use the new `git_index_fill` internal API to fill the index with the initial staged entries. The new `fill` helper assumes that all the entries will be unique and valid, so it can append them at the end of the entries vector and only sort it once at the end. It performs no validation checks. This prevents the quadratic behavior caused by having to sort the entries list once after every insertion.
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions