user-manual: revise birdseye-view chapter
[gitweb.git] / builtin-log.c
index 1c9f7d02a8746d1d33347b7baaa85e4153a61bbb..51294900dd12bac253a1f8a67f093f1a1dfbcb4b 100644 (file)
@@ -35,7 +35,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
                if (!prefixcmp(arg, "--encoding=")) {
                        arg += 11;
                        if (strcmp(arg, "none"))
-                               git_log_output_encoding = strdup(arg);
+                               git_log_output_encoding = xstrdup(arg);
                        else
                                git_log_output_encoding = "";
                }
@@ -439,7 +439,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 
        /*
         * Parse the arguments before setup_revisions(), or something
-        * like "git fmt-patch -o a123 HEAD^.." may fail; a123 is
+        * like "git format-patch -o a123 HEAD^.." may fail; a123 is
         * possibly a valid SHA1.
         */
        for (i = 1, j = 1; i < argc; i++) {
@@ -482,10 +482,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                        memcpy(add_signoff, committer, endpos - committer + 1);
                        add_signoff[endpos - committer + 1] = 0;
                }
-               else if (!strcmp(argv[i], "--attach"))
+               else if (!strcmp(argv[i], "--attach")) {
                        rev.mime_boundary = git_version_string;
-               else if (!prefixcmp(argv[i], "--attach="))
+                       rev.no_inline = 1;
+               }
+               else if (!prefixcmp(argv[i], "--attach=")) {
+                       rev.mime_boundary = argv[i] + 9;
+                       rev.no_inline = 1;
+               }
+               else if (!strcmp(argv[i], "--inline")) {
+                       rev.mime_boundary = git_version_string;
+                       rev.no_inline = 0;
+               }
+               else if (!prefixcmp(argv[i], "--inline=")) {
                        rev.mime_boundary = argv[i] + 9;
+                       rev.no_inline = 0;
+               }
                else if (!strcmp(argv[i], "--ignore-if-in-upstream"))
                        ignore_if_in_upstream = 1;
                else if (!strcmp(argv[i], "--thread"))