blameview: Use git-cat-file to read the file content.
PATCH 1/1 Update git-cat-file documentation
In reply to a message not in the archiveFrom: Aneesh Kumar K.V <[email protected]> - unquoted
Update git-cat-file documentation with references for different ways of specifying <objects>
--- Documentation/git-cat-file.txt | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
Documentation/git-cat-file.txt +3 -1
@@ -19,7 +19,9 @@ or '-s' is used to find the object size. OPTIONS ------- <object>:: - The sha1 identifier of the object. + The name of the object to show. + For a more complete list of ways to spell object names, see + "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. -t:: Instead of the content, show the object type identified by
Signature · 1 line
1.5.0.rc2.75.gdbaa0-dirty
PATCH 1/1 blameview: Support browsable functionality to blameview.
In reply to a message not in the archiveFrom: Aneesh Kumar K.V <[email protected]> - unquoted
Double clicking on the row exec a new blameview with commit hash as argument.
--- contrib/blameview/blameview.perl | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-)
contrib/blameview/blameview.perl +20 -3
@@ -3,7 +3,17 @@ use Gtk2 -init; use Gtk2::SimpleList; -my $fn = shift or die "require filename to blame"; +my $hash; +my $fn; +if ( @ARGV == 1 ) { + $hash = "HEAD"; + $fn = shift; +} elsif ( @ARGV == 2 ) { + $hash = shift; + $fn = shift; +} else { + die "Usage blameview [<rev>] <filename>"; +} Gtk2::Rc->parse_string(<<'EOS'); style "treeview_style"
@@ -27,17 +37,24 @@ $scrolled_window->add($fileview); $fileview->get_column(0)->set_spacing(0); $fileview->set_size_request(1024, 768); $fileview->set_rules_hint(1); +$fileview->signal_connect (row_activated => sub { + my ($sl, $path, $column) = @_; + my $row_ref = $sl->get_row_data_from_path ($path); + system("blameview @$row_ref[0] $fn"); + # $row_ref is now an array ref to the double-clicked row's data. + }); my $fh; -open($fh, '-|', "git cat-file blob HEAD:$fn") +open($fh, '-|', "git cat-file blob $hash:$fn") or die "unable to open $fn: $!"; + while(<$fh>) { chomp; $fileview->{data}->[$.] = ['HEAD', '?', "$fn:$.", $_]; } my $blame; -open($blame, '-|', qw(git blame --incremental --), $fn) +open($blame, '-|', qw(git blame --incremental --), $fn, $hash) or die "cannot start git-blame $fn"; Glib::IO->add_watch(fileno($blame), 'in', \&read_blame_line);
Signature · 1 line
1.5.0.rc2.75.gdbaa0-dirty
Re: [PATCH] blameview: Support browsable functionality to blameview.
Quoted 1 line · Aneesh Kumar K.V
From: Aneesh Kumar K.V <[email protected]> - unquoted
Sorry, my fault.
-- >8 --
[PATCH] git-send-email: remove debugging output.
rfc2047 unquoter spitted out an annoying "- unquoted" which was added during debugging but I forgot to remove.
--- git-send-email.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
git-send-email.perl +1 -1
@@ -408,7 +408,7 @@ sub unquote_rfc2047 { s/_/ /g; s/=([0-9A-F]{2})/chr(hex($1))/eg; } - return "$_ - unquoted"; + return "$_"; } sub send_message
Signature · 1 line
1.5.0.rc2.77.g1732a
PATCH 1/1 blameview: Use git-cat-file to read the file content.
In reply to a message not in the archiveFrom: Aneesh Kumar K.V <[email protected]> - 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.
--- contrib/blameview/blameview.perl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
contrib/blameview/blameview.perl +2 -1
@@ -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;
Signature · 1 line
1.5.0.rc2.75.gdbaa0-dirty