git-am --whitespace: do not lose the command line option
[gitweb.git] / builtin-log.c
index 75d698f0cef491b2c7fdc4920b37cb8e61da5e20..b164717379627b7bfc303bd3fdf360ecd2db152d 100644 (file)
@@ -28,7 +28,6 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
                      struct rev_info *rev)
 {
        int i;
-       int decorate = 0;
 
        rev->abbrev = DEFAULT_ABBREV;
        rev->commit_format = CMIT_FMT_DEFAULT;
@@ -55,7 +54,9 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
                const char *arg = argv[i];
                if (!strcmp(arg, "--decorate")) {
                        load_ref_decorations();
-                       decorate = 1;
+                       rev->show_decorations = 1;
+               } else if (!strcmp(arg, "--source")) {
+                       rev->show_source = 1;
                } else
                        die("unrecognized argument: %s", arg);
        }