[gitg/wip/techlivezh/bug/720731] Show file renames in diff stats
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/bug/720731] Show file renames in diff stats
- Date: Wed, 25 Dec 2013 04:41:40 +0000 (UTC)
commit 6e180222c6b570614e55f776923f2b68c631f482
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 3698326..108bb60 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -99,7 +99,11 @@ function diff_file(file, lnstate, data)
var file_path;
- if (file.file.new.path)
+ if (file.similarity > 0)
+ {
+ file_path = file.file.new.path + ' ← ' +file.file.old.path;
+ }
+ else if (file.file.new.path)
{
file_path = file.file.new.path;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]