Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [GIT-GUI PATCH] Teach git gui about file type changes

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:13
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Gustaf Hendeby [off-list ref] wrote:
First of all, I'm really new to tcl/tk and the git gui code base so I
would appreciate any and all pointers here to make the changes
acceptable.
Your patch looks good, but I am squashing this into it.  By using
?T rather than _T we can correctly handle MT, which I think happens
when the user modifies the file content, stages the file, then
changes the mode (644->755).
diff --git a/lib/index.tcl b/lib/index.tcl
index 0a98715..7c27f2a 100644
--- a/lib/index.tcl
+++ b/lib/index.tcl
@@ -233,7 +233,7 @@ proc write_checkout_index {fd pathList totalCnt batch after} {
 		switch -glob -- [lindex $file_states($path) 0] {
 		U? {continue}
 		?M -
-		_T -
+		?T -
 		?D {
 			puts -nonewline $fd "[encoding convertto $path]\0"
 			display_file $path ?_
@@ -300,7 +300,7 @@ proc add_helper {txt paths} {
 		_O -
 		?M -
 		?D -
-		_T -
+		?T -
 		U? {
 			lappend pathList $path
 			if {$path eq $current_diff_path} {
@@ -341,7 +341,7 @@ proc do_add_all {} {
 		switch -glob -- [lindex $file_states($path) 0] {
 		U? {continue}
 		?M -
-		_T -
+		?T -
 		?D {lappend paths $path}
 		}
 	}
@@ -359,7 +359,7 @@ proc revert_helper {txt paths} {
 		switch -glob -- [lindex $file_states($path) 0] {
 		U? {continue}
 		?M -
-		_T -
+		?T -
 		?D {
 			lappend pathList $path
 			if {$path eq $current_diff_path} {
 
Secondly, I could really not come up with an icon to represent a type
change of a file.  Right now it is just different from all the others
and not illustrative at all...
I think the icon looks fine.  I cannot come up with anything
better myself.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help