jwiegley / gitlib

180 stars 56 forks source link

some errors in lgReadIndex #57

Open imp1377 opened 8 years ago

imp1377 commented 8 years ago
let oid   = c'git_index_entry'oid entry

there is no oid field in git_index_entry struct ( changed to id )

if 0 /= flags .&. 2 -- c'GIT_IDXENTRY_REMOVE

incorrect. flags contains path length in less 12 bits. this expression excluding entries with path size 2. for GIT_IDXENTRY_REMOVE see flags_extended

jwiegley commented 8 years ago

This might be true in the latest libgit2, but gitlib uses it own version of libgit2. How did you determine these errors?

imp1377 commented 8 years ago

for 2 files in test repo index ( "f1" and "f2" ) readIndex returns empty list. after adding file "ololo" it was returned.