promisor-remote: accept 0 as oid_nr in function
authorJonathan Tan <redacted>
Thu, 2 Apr 2020 19:19:16 +0000 (12:19 -0700)
committerJunio C Hamano <redacted>
Thu, 2 Apr 2020 19:42:32 +0000 (12:42 -0700)
commitdb7ed7418b3702ab2b2df755764c3f452917a890
tree888b61c185e11fff9b51fec37f8d4ff6c88a8dc1
parent274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925
promisor-remote: accept 0 as oid_nr in function

There are 3 callers to promisor_remote_get_direct() that first check if
the number of objects to be fetched is equal to 0. Fold that check into
promisor_remote_get_direct(), and in doing so, be explicit as to what
promisor_remote_get_direct() does if oid_nr is 0 (it returns 0, success,
immediately).

Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/index-pack.c
diff.c
promisor-remote.c
promisor-remote.h
unpack-trees.c
git clone https://git.99rst.org/PROJECT