summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2cbe557)
raw | patch | inline | side by side (parent: 2cbe557)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 23:51:38 +0000 (18:51 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 05:10:39 +0000 (00:10 -0500) |
I'd like to allow the user to have more control over how we format
the diff in the diff viewer; to that end we need to add additional
options to the diff-index command line as we construct the command
for execution.
So cleanup the command handling code now to use lappend so we can
come back and add in our additional options.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
the diff in the diff viewer; to that end we need to add additional
options to the diff-index command line as we construct the command
for execution.
So cleanup the command handling code now to use lappend so we can
come back and add in our additional options.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index fdb82812bd14304ae78ae5c66ef4f6572f509f4f..ea71526e6065bbade5b97a8a0ff38cca467518ec 100755 (executable)
--- a/git-gui
+++ b/git-gui
proc show_diff {path {w {}} {lno {}}} {
global file_states file_lists
- global PARENT diff_3way diff_active
+ global PARENT diff_3way diff_active repo_config
global ui_diff ui_fname_value ui_fstatus_value ui_status_value
if {$diff_active || ![lock_index read]} return
set ui_fstatus_value [mapdesc $m $path]
set ui_status_value "Loading diff of [escape_path $path]..."
- set cmd [list | git diff-index -p $PARENT -- $path]
+ set cmd [list | git diff-index]
+ lappend cmd --no-color
+ lappend cmd -p
+
switch $m {
MM {
- set cmd [list | git diff-index -p -c $PARENT $path]
+ lappend cmd -c
}
_O {
if {[catch {
}
}
+ lappend cmd $PARENT
+ lappend cmd --
+ lappend cmd $path
+
if {[catch {set fd [open $cmd r]} err]} {
set diff_active 0
unlock_index
close $fd
unlock_index
if {$update_index_rsd} {
- show_diff $ui_fname_value
+ reshow_diff
} else {
set ui_status_value {Ready.}
}