Commits


gitconfig.c: look for comments after trimming the start of the line This fixes the (harmless) errors raised by gitconfig.c on indented comment lines and adds a test case for it. Reported by James Cook, thanks! ok stsp@


log gitconfig.c parser errors to stderr, not stdout. ok stsp@


gitconfig.c: fix read/write out of bounds conf_parse_line advances the `line' pointer without decrementing the line size `sz'. This makes the parsing code mistakingly reading from the next line (`line' is just a pointer in a bigger buffer that holds the whole file) and may mangle it by writing NUL bytes in it. Add also a new regress case to trigger this case. Reported by falsifian on IRC, thanks! ok stsp@


gitconfig.c: fix printing of debugging logs all the othe LOG_DBG calls assume \n is implicit (like with err(3)), so remove the only explicit \n and make log_debug printing a newline too.


gitconfig.c: unbreak build when GITCONFIG_DEBUG is defined


convert two files to utf8 ok stsp


replace malloc+memcpy with strndup. no functional change intended ok stsp@


mark some function parameters as 'const', as they should be; patch by Omar Polo


silence a printf in our gitconfig parser; this code shouldn't print to stdout


use size_t for loop indices to avoid signedness warnings; from emaste@freebsd


fix bug where duplicates were returned from got_gitconfig_get_section_list()


parse remotes from gitconfig


obtain repo format version and commit author name/email from .git/config


add support for reading .git/config; parser was based on isakmpd/conf.c