Commit Briefs

437adc9d5b Yang Zhong

add fd field to got_worktree, modify got_fileindex_entry_update to use fds

These changes are intended to make got more compatible with FreeBSD's Capsicum. ok stsp


0823ffc2f6 Christian Weisgerber

use modern POSIX timestamp fields in struct stat

ok stsp







984c073dfe Stefan Sperling

add getter/setter for staged file index entry filetype


f5f1f9c21f Stefan Sperling

handle on-disk file index entry filetypes properly


2e1fa22206 Stefan Sperling

give bad symlinks a dedicated file type in the file index


ef8d60312a Stefan Sperling

keep file index entry permission bits clear for symlinks


20ccae3945 Stefan Sperling

cope with directory entries returned from readdir(3) with type DT_UNKNOWN

Such directory entries need special handling to make our directory traversal code work on filesystems that do not support the d_type optimization. I found this problem because references stored in the refs/ directory were not shown by 'got log' and 'tog log' when a repository is mounted over NFS. helpful feedback + ok millert@


3143d852d7 Stefan Sperling

fix ignores when a path is passed to 'got status'

Problem reported by semarie, who also provided initial regression test code. ok semarie


0553429dd6 Stefan Sperling

fix symlink check in got_fileindex_entry_update()


8bd8568cf9 Stefan Sperling

remove file index entries from RB tree upon flush to disk

Fixes a file index corruption problem with 'got rebase' found by tracey. ok tracey




a46b9f33fb Stefan Sperling

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.




22902794fc Stefan Sperling

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


7f91a1339f Stefan Sperling

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


ae8965b97d Stefan Sperling

add missing fdopendir() error check in read_dirlist()



56e0773df7 Stefan Sperling

convert tree entries from SIMPLEQ to an array