summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20fd60b)
raw | patch | inline | side by side (parent: 20fd60b)
author | Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no> | |
Sun, 16 Mar 2008 19:49:09 +0000 (20:49 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 16 Mar 2008 21:24:32 +0000 (14:24 -0700) |
Creating a branch in fast-import and then resetting it without making
any further commits to it currently causes an error message at the
end of the import.
This error is triggered by cvs2svn's git backend, which uses a
temporary fixup branch when it creates tags, because the fixup branch
is reset after each tag.
This patch prevents the error, allowing "reset" to be used to delete
temporary branches.
Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Acked-by: Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
any further commits to it currently causes an error message at the
end of the import.
This error is triggered by cvs2svn's git backend, which uses a
temporary fixup branch when it creates tags, because the fixup branch
is reset after each tag.
This patch prevents the error, allowing "reset" to be used to delete
temporary branches.
Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Acked-by: Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index 655913ddb27f758ce494fc18551e852c9a6aa9f1..73e5439d97481a0e4dcaa17d025b27ec3fdcf41b 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
struct ref_lock *lock;
unsigned char old_sha1[20];
+ if (is_null_sha1(b->sha1))
+ return 0;
if (read_ref(b->name, old_sha1))
hashclr(old_sha1);
lock = lock_any_ref_for_update(b->name, old_sha1, 0);