]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/commit.c
Sync with maint
[thirdparty/git.git] / builtin / commit.c
index 2db2ad0de4c4ecec80d7d36ac7552425aa786220..aa1332308a243802f2fb8bc98d276fd66510949b 100644 (file)
@@ -347,6 +347,9 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix
                if (interactive)
                        die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
 
+               if (all)
+                       die(_("--pathspec-from-file with -a does not make sense"));
+
                if (pathspec.nr)
                        die(_("--pathspec-from-file is incompatible with pathspec arguments"));
 
@@ -554,7 +557,7 @@ static void export_one(const char *var, const char *s, const char *e, int hack)
        struct strbuf buf = STRBUF_INIT;
        if (hack)
                strbuf_addch(&buf, hack);
-       strbuf_addf(&buf, "%.*s", (int)(e - s), s);
+       strbuf_add(&buf, s, e - s);
        setenv(var, buf.buf, 1);
        strbuf_release(&buf);
 }