Commits


portable: configure: split out dependencies Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.


got: minor refactor of got_pathlist_free() API Accept flag parameter to optionally specify which pointers to free. This saves callers looping through the list to free pointers. ok + fix stsp@


rm useless continue ok stsp


introduce got_path_move_file(); based on code from lib/patch.c ok op@


portable: add back sys/queue.h Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


build with -Wwrite-strings Throwing this into the mix for a while, we can always get rid of it again if it becomes annoying. No objections from stsp@


build with -Wmissing-prototypes ok stsp@


avoid malloc/free for duplicate check in got_pathlists_insert() ok op@


rename variables in got_path_strip() for clarity; ok op@


got patch: allow to strip path components Move some bits from the libexec helper to the main process so we know if the patch was generated by git or not and finally document the automatic stripping of a/ and b/ prefixes added by git-diff(1). ok stsp@


fix wrong path in a comment


add O_CLOEXEC (close-on-exec) flag to open(2) calls suggested by millert ok thomas_adam


portable: initial Linux compilation This commit modifies the GoT main branch to be able to compile it under linux.


remove unused function got_path_get_absolute(); realpath(3) is usually better


handle non-const dirname(3) in got_path_dirname() ok naddy


handle non-const basename in got_path_basename() ok millert


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@


make got_path_is_root_dir() deal with an arbitrary amount of leading slashes


when "bad path" errors occur, always show the path in question


Avoid out of bounds access if path is "/". From Martin <openbsd () academicsolutions ! ch> with tweaks by me. ok stsp


fix error return in got_path_find_prog() (patch by Steven McDonald)


simplify cleanup code paths in got_path_find_prog()


fix some more occurrences of potential errno clobbering


remove redundant strlen() calls from got_path_cmp()


cache path length in struct got_pathlist_entry