Commits


introduce got_opentemp_truncatefd()


plug some fd leaks in the fdopen{,dir} error paths There's also a memory leak fixed. ok stsp@


consistently use ten Xs in mkstemp(3) templates patch from Josiah Frentsos, thanks!


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.


use mkstemps(3) instead of mkstemp(3) for opening named temporary files Allows 'got commit' to use a ".diff" suffix for temporary diff files. ok op@


check for unlink(2) errors in got_opentempfd() ok op@


reuse a temporary file across commits during got log -p -S suggested by + ok op@


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


in got_opentempfd() don't attempt to unlink the file if mkstemp(3) failed


make tmp dir location a compile-time setting and change gotweb's tmp dir We are not sure whether a gotweb package can own /var/www/tmp on OpenBSD. Moving gotweb's tmp dir to /var/www/got/tmp sidesteps that issue.


got_opentemp_named: include path in error message


rename got_error_prefix_errno() to got_error_from_errno()


got_error_from_errno -> got_error_prefix_errno also add got_error_prefix_errno2 and got_error_prefix_errno3 which should hopefully all be merged into a single function with variadic args (but can't alloc mem)


add a basic 'got update' command; does not merge files yet


initialize *outfile in got_opentemp_named()


move got_opentmp* functions to public API; used from tog