[gitg/wip/techlivezh/show-diff-renames] 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] Show file renames in diff stats
- Date: Fri, 20 Dec 2013 05:44:06 +0000 (UTC)
commit 4819037def30bbb02832615a8e6552bde0936ef9
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..ec645f2 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]