a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone

commit 973deda0eaf4e16c8cc0b25ca1bff1faae17584e
parent bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e
Author: Jason A. Donenfeld <>
Date:   Sun,  3 Mar 2013 23:41:53 -0500

ui-snapshot.c: Fill argv[0] with dummy.

parse_archive_args does not pass PARSE_OPT_KEEP_ARGV0 to parse_args,
which means the first argument will be discarded, as though it were a
function being called from the command-line. Thus, we fill argv[0] with
a dummy argument to prevent this from happening.

Signed-off-by: Jason A. Donenfeld <>

Mui-snapshot.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/ui-snapshot.c b/ui-snapshot.c @@ -14,6 +14,7 @@ static int write_archive_type(const char *format, const char *hex, const char *prefix) { struct argv_array argv = ARGV_ARRAY_INIT; + argv_array_push(&argv, "snapshot"); argv_array_push(&argv, format); if (prefix) { argv_array_push(&argv, "--prefix");