Code

Add the --submodule option to the diff option family
[git.git] / builtin-mailinfo.c
index 03cbcad1ff282c33c178d741067c3ac676a96aa8..c90cd312ac99fe9a2169664e86a089b5378cacbe 100644 (file)
@@ -785,8 +785,10 @@ static int handle_commit_msg(struct strbuf *line)
 
        if (use_scissors && is_scissors_line(line)) {
                int i;
-               rewind(cmitmsg);
-               ftruncate(fileno(cmitmsg), 0);
+               if (fseek(cmitmsg, 0L, SEEK_SET))
+                       die_errno("Could not rewind output message file");
+               if (ftruncate(fileno(cmitmsg), 0))
+                       die_errno("Could not truncate output message file at scissors");
                still_looking = 1;
 
                /*
@@ -1004,7 +1006,7 @@ static int git_mailinfo_config(const char *var, const char *value, void *unused)
 }
 
 static const char mailinfo_usage[] =
-       "git mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
+       "git mailinfo [-k] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch < mail >info";
 
 int cmd_mailinfo(int argc, const char **argv, const char *prefix)
 {