cache-tree: replace "for" loops in update_one with "while" loops
commit386cc8b031611497186a8c89be0f980a54786525
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 16 Dec 2012 04:15:26 +0000 (16 11:15 +0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Dec 2012 07:04:22 +0000 (15 23:04 -0800)
treec95a7b1f90d484161d5f79a9553526d79f071433
parentdbc3904ebc604bf5b818d9840b79228aacdd1343
cache-tree: replace "for" loops in update_one with "while" loops

The loops in update_one can be increased in two different ways: step
by one for files and by <n> for directories. "for" loop is not
suitable for this as it always steps by one and special handling is
required for directories. Replace them with "while" loops for clarity.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c