Skip to content

Commit

Permalink
git-gui: Use -M and -C when running blame.
Browse files Browse the repository at this point in the history
Since we run blame incrementally in the background we might as well get
as much data as we can from the file.  Adding -M and -C definately makes
it take longer to compute the revision annotations, but since they are
streamed in and updated as they are discovered we'll get recent data
almost immediately anyway.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Jan 29, 2007
1 parent db45378 commit 463ca37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3276,7 +3276,9 @@ proc read_blame_catfile {fd w commit path texts w_lno w_file} {
if {[eof $fd]} {
close $fd
set blame_status($w) {Loading annotations...}
set fd [open "| git blame --incremental $commit -- $path" r]
set cmd [list git blame -M -C --incremental]
lappend cmd $commit -- $path
set fd [open "| $cmd" r]
fconfigure $fd -blocking 0 -translation lf -encoding binary
fileevent $fd readable "read_blame_incremental $fd $w $texts"
}
Expand Down

0 comments on commit 463ca37

Please sign in to comment.