diff options
| -rw-r--r-- | ui-commit.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ui-commit.c b/ui-commit.c index c5ee8e7..b49b2e9 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
| @@ -46,8 +46,15 @@ void print_filepair(struct diff_filepair *pair) | |||
| 46 | 46 | ||
| 47 | html("<tr>"); | 47 | html("<tr>"); |
| 48 | htmlf("<td class='mode'>"); | 48 | htmlf("<td class='mode'>"); |
| 49 | html_filemode(pair->two->mode); | 49 | if (is_null_sha1(pair->two->sha1)) { |
| 50 | if (pair->one->mode != pair->two->mode) { | 50 | html_filemode(pair->one->mode); |
| 51 | } else { | ||
| 52 | html_filemode(pair->two->mode); | ||
| 53 | } | ||
| 54 | |||
| 55 | if (pair->one->mode != pair->two->mode && | ||
| 56 | !is_null_sha1(pair->one->sha1) && | ||
| 57 | !is_null_sha1(pair->two->sha1)) { | ||
| 51 | html("<span class='modechange'>["); | 58 | html("<span class='modechange'>["); |
| 52 | html_filemode(pair->one->mode); | 59 | html_filemode(pair->one->mode); |
| 53 | html("]</span>"); | 60 | html("]</span>"); |
