Mercurial > hg
changeset 38867:4c0fd3f0a15d
index: drop support for nullid at position len(index) in index_node
I think no callers exist since at least a3dacabd476b (index: don't
allow index[len(index)] to mean nullid, 2018-07-20).
Differential Revision: https://phab.mercurial-scm.org/D4105
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 04 Aug 2018 22:48:25 -0700 |
parents | aa33988ad8ab |
children | 0db50770f388 |
files | mercurial/cext/revlog.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/revlog.c Sat Aug 04 23:15:03 2018 -0700 +++ b/mercurial/cext/revlog.c Sat Aug 04 22:48:25 2018 -0700 @@ -228,10 +228,10 @@ Py_ssize_t length = index_length(self) + 1; const char *data; - if (pos == length - 1 || pos == -1) + if (pos == -1) return nullid; - if (pos >= length) + if (pos >= length - 1) return NULL; if (pos >= self->length - 1) {