@matheusbsbs / matheus-bagliano / commits / a41e45ea1c
Fork 0

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>

Shawn O. Pearce committed Jan 16, 2008 at 01:29 UTC a41e45ea1ccc88b4b13af16434c79ffe65ba978a
1 file changed +2
lib/diff.tcl
+2
@@ -358,5 +358,7 @@ proc apply_hunk {x y} {
358 display_file $current_diff_path $mi
359 if {$o eq {_}} {
360 clear_diff
361 + } else {
362 + set current_diff_path $current_diff_path
363 }
364 }