We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f326a06 + b7c1ce4 commit 267684fCopy full SHA for 267684f
fast-import.c
@@ -539,22 +539,17 @@ static struct object_entry *insert_object(unsigned char *sha1)
539
{
540
unsigned int h = sha1[0] << 8 | sha1[1];
541
struct object_entry *e = object_table[h];
542
- struct object_entry *p = NULL;
543
544
while (e) {
545
if (!hashcmp(sha1, e->idx.sha1))
546
return e;
547
- p = e;
548
e = e->next;
549
}
550
551
e = new_object(sha1);
552
- e->next = NULL;
+ e->next = object_table[h];
553
e->idx.offset = 0;
554
- if (p)
555
- p->next = e;
556
- else
557
- object_table[h] = e;
+ object_table[h] = e;
558
559
560
0 commit comments