Merge branch 'js/fsck-name-object' into maint
[gitweb.git] / builtin / diff.c
index 1a1149eed44a27d162f6e17bfb9221e58dca68fd..5e7c6428c91203fa1f3fb0c7790364987a623fc0 100644 (file)
@@ -90,7 +90,8 @@ static int builtin_diff_b_f(struct rev_info *revs,
                     blob[0]->mode, canon_mode(st.st_mode),
                     &blob[0]->item->oid, &null_oid,
                     1, 0,
-                    path, path);
+                    blob[0]->path ? blob[0]->path : path,
+                    path);
        diffcore_std(&revs->diffopt);
        diff_flush(&revs->diffopt);
        return 0;