Commits


improve execv error message spotted using -portable on a system without openssh installed. Showing the program we've failed to exec can be handy. ok stsp@


significantly reduce the amount of code linked into gitwrapper By moving got_serve_parse_command() from lib/serve.c into lib/dial.c as got_dial_parse_command(), we can significantly reduce the amount of symbols gitwrapper depends on indirectly. As a downside, gotsh now needs to link to dial.c. But it only uses the same parsing routine, and any other routines in dial.c would likely cause pledge violations in gotsh if used. No functional change.


dial: fix quoting for git-shell Escape the path to the repository when connecting via SSH. This is needed if the path contains spaces, quotes or other "funny" characters, but also by git-shell which requires the argument to be surrounded by single-quote characters. Issue with git-shell reported by James Cook, fix based on an initial diff by stsp@. ok stsp@


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.


add missing freaddrinfo also spotted by valgrind. ok stsp@


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@


fix level of indirection ok stsp


make the URI parser tolerate trailing slashes at the end of the input URI ok naddy


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


assert against accidentally overflowing argv[] in got_dial_ssh() ok stsp


rename got_fetch_parse_uri() to got_dial_parse_uri() This function is now being used by both 'got fetch' and 'got send' so its former name was misleading.


move duplicated dial_ssh() and dial_git() functions into a common file These functions are used by 'got send' and 'got fetch' in order to open network connections to a server. Move them into new file lib/dial.c and declare relevant functions in got_dial.h and lib/got_lib_dial.h. No functional change.