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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gustaf Hendeby <hendeby@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux