git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>
To: git@vger.kernel.org
Cc: junkio@cox.net
Subject: [PATCH] blameview: Use git-cat-file to read the file content.
Date: Tue, 30 Jan 2007 13:26:49 +0530	[thread overview]
Message-ID: <45befa5a.3eba48a4.1e16.ffffabd9@mx.google.com> (raw)
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

       reply	other threads:[~2007-01-30  7:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11701438112263-git-send-email->
2007-01-30  7:56 ` Aneesh Kumar K.V [this message]
     [not found] ` <11701438241247-git-send-email->
2007-01-30  7:56   ` [PATCH] blameview: Support browsable functionality to blameview Aneesh Kumar K.V
2007-01-30 10:33     ` Junio C Hamano
     [not found]   ` <11701438362085-git-send-email->
2007-01-30  7:56     ` [PATCH] Update git-cat-file documentation Aneesh Kumar K.V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45befa5a.3eba48a4.1e16.ffffabd9@mx.google.com \
    --to=aneesh.kumar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).