Mercurial > hg
changeset 40961:b54727f82511
sparse-revlog: handle nullrev in index_get_start
The more generic index_get method handle nullrev fine, we apply the same logic
here.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 14 Dec 2018 17:23:41 +0100 |
parents | 43974cd44967 |
children | c6939b353ebd |
files | mercurial/cext/revlog.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/revlog.c Fri Dec 14 17:22:42 2018 +0100 +++ b/mercurial/cext/revlog.c Fri Dec 14 17:23:41 2018 +0100 @@ -225,6 +225,9 @@ static inline int64_t index_get_start(indexObject *self, Py_ssize_t rev) { uint64_t offset; + if (rev == nullrev) { + return 0; + } if (rev >= self->length) { PyObject *tuple; PyObject *pylong;