]> git.ipfire.org Git - thirdparty/git.git/commit - tree-diff.c
tree-diff: move all action-taking code out of compare_tree_entry()
authorKirill Smelkov <kirr@mns.spb.ru>
Mon, 24 Feb 2014 16:21:40 +0000 (20:21 +0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Mar 2014 22:04:31 +0000 (15:04 -0700)
commit903bba68abb8153f181d854e9a7075b893f1303f
treeb689b132f68ee53f85ba20f51f2f0019fdae7825
parent5dfb2bbd8d2e2e48aa3ad6c6a8f437bbe5d2a7fb
tree-diff: move all action-taking code out of compare_tree_entry()

- let it do only comparison.

This way the code is cleaner and more structured - cmp function only
compares, and the driver takes action based on comparison result.

There should be no change in performance, as effectively, we just move
if series from on place into another, and merge it to was-already-there
same switch/if, so the result is maybe a little bit faster.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree-diff.c