summaryrefslogtreecommitdiff
path: root/diffcore-delta.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2020-03-10 15:30:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-10 18:44:24 (GMT)
commit7422b2a0a11749942db71d59e3e1221ccba5e7ce (patch)
tree36372a98e85498060d50c32fc9d670cfc9d45d1e /diffcore-delta.c
parent4cd1cf31efed9b16db5035c377bfa222f5272458 (diff)
downloadgit-7422b2a0a11749942db71d59e3e1221ccba5e7ce.zip
git-7422b2a0a11749942db71d59e3e1221ccba5e7ce.tar.gz
git-7422b2a0a11749942db71d59e3e1221ccba5e7ce.tar.bz2
commit-slab: clarify slabname##_peek()'s return value
Ever since 862e730ec1 (commit-slab: introduce slabname##_peek() function, 2015-05-14) the slabname##_peek() function is documented as: This function is similar to indegree_at(), but it will return NULL until a call to indegree_at() was made for the commit. This, however, is usually not the case. If indegree_at() allocates memory, then it will do so not only for the single commit it got as parameter, but it will allocate a whole new, ~512kB slab. Later on, if any other commit's 'index' field happens to point into an already allocated slab, then indegree_peek() for such a commit will return a valid non-NULL pointer, pointing to a zero-initialized location in the slab, even if no indegree_at() call has been made for that commit yet. Update slabname##_peek()'s documentation to clarify this. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-delta.c')
0 files changed, 0 insertions, 0 deletions