summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-01-16 01:29:39 -0500
committerShawn O. Pearce <spearce@spearce.org>2008-01-16 01:29:39 -0500
commita41e45ea1ccc88b4b13af16434c79ffe65ba978a (patch)
tree396f7e2a3e56b7bdab7d82bc95d57a8095b8ba58
parentgit-gui: Allow 'Create New Repository' on existing directories (diff)
downloadgit-a41e45ea1ccc88b4b13af16434c79ffe65ba978a.tar.xz
git-a41e45ea1ccc88b4b13af16434c79ffe65ba978a.zip
git-gui: Refresh file status description after hunk application
If we apply a hunk in either direction this may change the file's status. For example if a file is completely unstaged, and has at least two hunks in it and the user stages one hunk the file will change from "Modified, not staged" to "Portions staged for commit". Resetting the file path causes our trace on this variable to fire; that trace is used to update the file header in the diff viewer to the file's current status. Noticed by Johannes Sixt. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--lib/diff.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 18aba3eae34..d04f6dbde2c 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -358,5 +358,7 @@ proc apply_hunk {x y} {
display_file $current_diff_path $mi
if {$o eq {_}} {
clear_diff
+ } else {
+ set current_diff_path $current_diff_path
}
}