do not write null sha1s to on-disk index
[gitweb.git] / diff-no-index.c
index e48ab92ba1ae9bfe746eaedaa76fe73421a80cb9..6568eea6f4a465a40f522584a6fcaf92841f16e7 100644 (file)
@@ -141,8 +141,8 @@ static int queue_diff(struct diff_options *o,
                        name2 = "/dev/null";
                d1 = alloc_filespec(name1);
                d2 = alloc_filespec(name2);
-               fill_filespec(d1, null_sha1, mode1);
-               fill_filespec(d2, null_sha1, mode2);
+               fill_filespec(d1, null_sha1, 0, mode1);
+               fill_filespec(d2, null_sha1, 0, mode2);
 
                diff_queue(&diff_queued_diff, d1, d2);
                return 0;
@@ -260,8 +260,8 @@ void diff_no_index(struct rev_info *revs,
        if (diff_setup_done(&revs->diffopt) < 0)
                die("diff_setup_done failed");
 
-       if (queue_diff(&revs->diffopt, revs->diffopt.paths[0],
-                      revs->diffopt.paths[1]))
+       if (queue_diff(&revs->diffopt, revs->diffopt.pathspec.raw[0],
+                      revs->diffopt.pathspec.raw[1]))
                exit(1);
        diff_set_mnemonic_prefix(&revs->diffopt, "1/", "2/");
        diffcore_std(&revs->diffopt);