Merge branch 'jc/parseopt-command-modes'
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 80f8439441c76b0b654d40e3fca9407d1153efcf..061694b5ea9f860a03d569b7a6bc438b9bcbf8a7 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2252,7 +2252,7 @@ static void builtin_diff(const char *name_a,
                        (!two->mode || S_ISGITLINK(two->mode))) {
                const char *del = diff_get_color_opt(o, DIFF_FILE_OLD);
                const char *add = diff_get_color_opt(o, DIFF_FILE_NEW);
-               show_submodule_summary(o->file, one ? one->path : two->path,
+               show_submodule_summary(o->file, one->path ? one->path : two->path,
                                line_prefix,
                                one->sha1, two->sha1, two->dirty_submodule,
                                meta, del, add, reset);