]> git.proxmox.com Git - libgit2.git/commit
index: set last entry when reading compressed entries
authorPatrick Steinhardt <ps@pks.im>
Fri, 12 May 2017 08:01:43 +0000 (10:01 +0200)
committerPatrick Steinhardt <ps@pks.im>
Tue, 6 Jun 2017 07:38:43 +0000 (09:38 +0200)
commit11d0be23c481f2df2e03e804c611a0f7d2be1599
treec573fef12d8575300a9eca7d6bf95d1b4ed0b5c2
parentfebe8c14a0cb3530f49a3990c1ff031d45d12ce6
index: set last entry when reading compressed entries

To calculate the path of a compressed index entry, we need to know the
preceding entry's path. While we do actually set the first predecessor
correctly to "", we fail to update this while reading the entries.

Fix the issue by updating `last` inside of the loop. Previously, we've
been passing a double-pointer to `read_entry`, which it didn't update.
As it is more obvious to update the pointer inside the loop itself,
though, we can simply convert it to a normal pointer.
src/index.c