git-merge: show usage if run without arguments
[gitweb.git] / builtin-log.c
index fbc58bbcab1a992efb6ee359171d7ed6f0c52ab9..9d1ceae44c6a449d2329e897b9705a5b457187f0 100644 (file)
@@ -348,6 +348,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
        if (!rev.diffopt.output_format)
                rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
 
+       if (!output_directory)
+               output_directory = prefix;
+
        if (output_directory) {
                if (use_stdout)
                        die("standard output, or directory, which one?");