[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: Wed, 25 Dec 2013 03:42:06 +0000 (UTC)
commit 8929c6a3bfda45fe6c31aa3003894d9628259d49
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..c1f329c 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]