X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=fast-import.c;h=73e5439d97481a0e4dcaa17d025b27ec3fdcf41b;hb=3ea5a1b33d99b6c4f5e745c0dd017307c58cff31;hp=655913ddb27f758ce494fc18551e852c9a6aa9f1;hpb=16007f3916b885d29de6c48832aa6a4213ab7588;p=git.git diff --git a/fast-import.c b/fast-import.c index 655913ddb..73e5439d9 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1516,6 +1516,8 @@ static int update_branch(struct branch *b) 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);