[PATCH] blameview: Use git-cat-file to read the file content.
- From
Aneesh Kumar K.V <aneesh.kumar@gmail.com>
- Date
- Jan 30, 2007, 07:56 UTC
- Message-ID
- <45befa5a.3eba48a4.1e16.ffffabd9@mx.google.com>
- In-Reply-To
- <11701438112263-git-send-email->
From: Aneesh Kumar K.V <aneesh.kumar@gmail.com> - unquoted
Fix blameview to use git-cat-file to read the file content. This make sure we show the right content when we have modified file in the working directory which is not committed.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> --- contrib/blameview/blameview.perl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/contrib/blameview/blameview.perl b/contrib/blameview/blameview.perl index e8bcb1b..8261e47 100755 --- a/contrib/blameview/blameview.perl +++ b/contrib/blameview/blameview.perl @@ -28,7 +28,8 @@ $fileview->get_column(0)->set_spacing(0); $fileview->set_size_request(1024, 768); $fileview->set_rules_hint(1); -open(my $fh, '<', $fn) +my $fh; +open($fh, '-|', "git cat-file blob HEAD:$fn") or die "unable to open $fn: $!"; while(<$fh>) { chomp;
-- 1.5.0.rc2.75.gdbaa0-dirty