revision.c: refactor add_index_objects_to_pending()
commit6c3d818154eb74a4d5b35e786eefd297745bae1a
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 23 Aug 2017 12:36:51 +0000 (23 19:36 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Aug 2017 21:42:45 +0000 (24 14:42 -0700)
tree18a6589e5e2fcaa51867567970b5e0048af082ab
parentee394bd376e833d8e9e38f81c57f6b4a370e8a92
revision.c: refactor add_index_objects_to_pending()

The core code is factored out and take 'struct index_state *' instead so
that we can reuse it to add objects from index files other than .git/index
in the next patch.

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