fast-export: Fix dropping of files with --import-marks and path limiting
commit4087a02e452aafd0e9a6c3471c40fe76d6aafbe4
authorElijah Newren <newren@gmail.com>
Sat, 17 Jul 2010 17:00:50 +0000 (17 11:00 -0600)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Jul 2010 18:12:15 +0000 (19 11:12 -0700)
tree678629b4fe58e1c6a8ed175aabd75345fb54fe23
parent0ad0a61f05fe521a63ade9bfafd2f589fba0df33
fast-export: Fix dropping of files with --import-marks and path limiting

Since fast-export operates by listing file changes since the (first) parent
commit, when using --import-marks and path limiting and using a wider list
of paths than in previous runs, files from the new path(s) will silently be
omitted from the result unless or until a commit which explicitly changes
those files.  The resulting repository in such cases is broken and makes no
sense.

This commit fixes this by having fast-export work with complete trees
instead of incremental changes (when both --import-marks and path limiting
are used).  It works by issuing a 'deleteall' directive with each commit and
then listing the full set of files that make up that commit, rather than
just showing the list of files that have changed since the (first) parent
commit.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c
t/t9350-fast-export.sh