mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
mmapped_ref_iterator_advance(): no peeled value for broken refs
If a reference is broken, suppress its peeled value. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9cfb3dc0d1
commit
81b9b5aea7
@ -234,9 +234,15 @@ static int mmapped_ref_iterator_advance(struct ref_iterator *ref_iterator)
|
||||
|
||||
/*
|
||||
* Regardless of what the file header said, we
|
||||
* definitely know the value of *this* reference:
|
||||
* definitely know the value of *this* reference. But
|
||||
* we suppress it if the reference is broken:
|
||||
*/
|
||||
iter->base.flags |= REF_KNOWS_PEELED;
|
||||
if ((iter->base.flags & REF_ISBROKEN)) {
|
||||
oidclr(&iter->peeled);
|
||||
iter->base.flags &= ~REF_KNOWS_PEELED;
|
||||
} else {
|
||||
iter->base.flags |= REF_KNOWS_PEELED;
|
||||
}
|
||||
} else {
|
||||
oidclr(&iter->peeled);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user