fast-export: do not parse non-commit objects while reading marks file
commite6812cfa9aba69a8c9d83b0710291b27bff0f7a3
authorFelipe Contreras <felipe.contreras@gmail.com>
Sun, 5 May 2013 22:38:53 +0000 (5 17:38 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2013 14:03:01 +0000 (7 07:03 -0700)
treeb2b1906922e5bfe8c1903e28bbc6264e533c564a
parent7d3ccdffb5d28970dd7a4d177cfcca690ccd0c22
fast-export: do not parse non-commit objects while reading marks file

We read from the marks file and keep only marked commits, but in
order to find the type of object, we are parsing the whole thing,
which is slow, specially in big repositories with lots of big files.

There's no need for that, we can query the object information with
sha1_object_info().

Before this, loading the objects of a fresh emacs import, with 260598
blobs took 14 minutes, after this patch, it takes 3 seconds.

This is the way fast-import does it. Also die if the object is not
found (like fast-import).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c