aboutsummaryrefslogtreecommitdiff
path: root/builtin/fast-export.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2012-11-24 04:17:01 +0100
committerJunio C Hamano <gitster@pobox.com>2012-11-26 11:05:12 -0800
commit5d3698ffb4ccf8b842814559007e011fc409650b (patch)
treea038aa76261cb63916907918a133bbb11ba05450 /builtin/fast-export.c
parent3a189da601e676a997cbb06b53da02cac364b2ff (diff)
downloadgit-5d3698ffb4ccf8b842814559007e011fc409650b.tar.gz
git-5d3698ffb4ccf8b842814559007e011fc409650b.tar.xz
fast-export: avoid importing blob marks
We want to be able to import, and then export, using the same marks, so that we don't push things that the other side already received. Unfortunately, fast-export doesn't store blobs in the marks, but fast-import does. This creates a mismatch when fast export is reusing a mark that was previously stored by fast-import. There is no point in one tool saving blobs, and the other not, but for now let's just check in fast-export that the objects are indeed commits. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fast-export.c')
-rw-r--r--builtin/fast-export.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 12220ad8d..9b70ec1fc 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -614,6 +614,10 @@ static void import_marks(char *input_file)
if (object->flags & SHOWN)
error("Object %s already has a mark", sha1_to_hex(sha1));
+ if (object->type != OBJ_COMMIT)
+ /* only commits */
+ continue;
+
mark_object(object, mark);
if (last_idnum < mark)
last_idnum = mark;