Commits


kill left-over debug code snippet from a46b9f33fb3018765180eb67cc954d863a5cd525


fix a bug where 'got revert -R' failed on added subtrees The command could fail with "got: no such entry found in tree". This problem is reproduced by the regression test added in this commit. This happened because file index entries were processed in the wrong order by diff_fileindex_dir(). To fix this, keep removed entries in the RB tree and skip them when the file index is written out, rather than removing entries from the RB tree immediately causing side-effects for RB_NEXT and friends.


rewind directory file pointer before re-opening the directory


plug memory leak introduced in commit 6fc93f379e4f736797334532691d298244b2b014


this lseek() call in read_dirlist() isn't needed


open files during status crawl in a race-free way, too


add missing fdopendir() error check in read_dirlist()


prevent the status crawl from racing with paths changing in the filesystem


convert tree entries from SIMPLEQ to an array


avoid a NULL deref in diff_fileindex_tree(); found by jj@ with scan-build


make 'got status' ignore inaccessible directories (reported by semarie)


detect and ignore Git submodules


in got_fileindex_entry_update() don't hide errors other than ENOENT


don't clobber errno value of opendir(3); found by Hiltjo Posthuma


ensure that file index entry perms map to regular files


fix definition of GOT_FILEIDX_F_STAGE_SHIFT


implement got_worktree_stage_paths()


add staged blob SHA1 to on-disk file index; bump file index version


define file index stage flags


rename file index entry variables called 'entry' to 'ie'


remove ie->path_len; use path length stored in file index entry flags


remove unused fileindex flags


require callers to pass path length to got_fileindex_entry_get()


always initialize file index entry's path_len field


eliminate strlen() calls during fileindex rb tree searches