OSDN Git Service

rerere: stop looping unnecessarily
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2015 23:10:10 +0000 (16:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jul 2015 22:09:32 +0000 (15:09 -0700)
commit74444d4ec4c23d254040de7b2637660b7f141110
tree266d4272fe9db86be33d88b347415ea5faad0504
parent67711cdc399203ec1d70cde2c3cd71e37e43da70
rerere: stop looping unnecessarily

handle_cache() loops 3 times starting from an index entry that is
unmerged, while ignoring an entry for a path that is different from
what we are looking for.

As the index is sorted, once we see a different path, we know we saw
all stages for the path we are interested in.  Just loop while we
see the same path and then break, instead of continuing for 3 times.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere.c