[gitg/wip/techlivezh/show-diff-renames: 10/10] Show file renames in diff stats
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/show-diff-renames: 10/10] Show file renames in diff stats
- Date: Mon, 23 Dec 2013 15:16:38 +0000 (UTC)
commit 2e812e3eb759f075382d2de1e2af8457ecc1cb24
Author: Techlive Zheng <techlivezheng gmail com>
Date: Tue Dec 10 18:22:11 2013 +0800
Show file renames in diff stats
https://bugzilla.gnome.org/show_bug.cgi?id=720731
libgitg/gitg-commit.vala | 2 ++
libgitg/resources/diff-view-html-builder.js | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-commit.vala b/libgitg/gitg-commit.vala
index bcce2ba..2d4930c 100644
--- a/libgitg/gitg-commit.vala
+++ b/libgitg/gitg-commit.vala
@@ -153,6 +153,8 @@ public class Commit : Ggit.Commit
}
}
}
+
+ diff.find_similar();
}
catch {}
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index b58e6c9..057b7be 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -111,7 +111,11 @@ function diff_file(file, lnstate, data)
var filepath;
- if (file.file.new.path)
+ if (file.similarity > 0)
+ {
+ filepath = file.file.new.path + ' (Previously: ' +file.file.old.path + ')';
+ }
+ else if (file.file.new.path)
{
filepath = file.file.new.path;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]