Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fast-import.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c
index 655913ddb2..73e5439d97 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);