From fb6e5869dcc81b775d5ac79dd3afac7220c366dd Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 17 Dec 2006 23:30:55 +0100 Subject: Don't show new and old filemode for added/removed files It gives us no extra info whatsoever to show "----------" for either new or old mode, it's just noise (especially since we now show the "old" filemode for deleted files) Signed-off-by: Lars Hjemli --- ui-commit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ui-commit.c') 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) html(""); htmlf(""); - html_filemode(pair->two->mode); - if (pair->one->mode != pair->two->mode) { + if (is_null_sha1(pair->two->sha1)) { + html_filemode(pair->one->mode); + } else { + html_filemode(pair->two->mode); + } + + if (pair->one->mode != pair->two->mode && + !is_null_sha1(pair->one->sha1) && + !is_null_sha1(pair->two->sha1)) { html("["); html_filemode(pair->one->mode); html("]"); -- cgit