Merge updated git-gui and gitk that call each other

Merge git://repo.or.cz/git-gui and git://git.kernel.org/pub/scm/gitk/gitk

    * git://repo.or.cz/git-gui:
      git-gui: Show special diffs for complex conflict cases.
      git-gui: Make F5 reselect a diff, if an untracked file is selected.
      git-gui: Reimplement and enhance auto-selection of diffs.
      git-gui: Support conflict states _U & UT.
      git-gui: Support more merge tools.
      git-gui: Don't allow staging files with conflicts.
      git-gui: Support calling merge tools.
      git-gui: Support resolving conflicts via the diff context menu.
      git-gui: Mark forgotten strings for translation.
      git-gui: Allow specifying an initial line for git gui blame.
      git-gui: Better positioning in Blame Parent Commit
      git-gui: Support passing blame to a parent commit.
      git-gui: Support starting gitk from Gui Blame
      git-gui: Teach git gui about file type changes

    * git://git.kernel.org/pub/scm/gitk/gitk:
      gitk: Add menu item for calling git gui blame
      gitk: Add option to specify the default commit on command line
This commit is contained in:
Junio C Hamano
2008-09-06 18:06:39 -07:00
9 changed files with 942 additions and 119 deletions

View File

@ -99,6 +99,7 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} {
switch -glob -- [lindex $s 0] {
A? {set new _O}
M? {set new _M}
T_ {set new _T}
D_ {set new _D}
D? {set new _?}
?? {continue}
@ -162,6 +163,8 @@ proc write_update_index {fd pathList totalCnt batch after} {
?D {set new D_}
_O -
AM {set new A_}
_T {set new T_}
_U -
U? {
if {[file exists $path]} {
set new M_
@ -231,6 +234,7 @@ proc write_checkout_index {fd pathList totalCnt batch after} {
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
?T -
?D {
puts -nonewline $fd "[encoding convertto $path]\0"
display_file $path ?_
@ -252,6 +256,7 @@ proc unstage_helper {txt paths} {
switch -glob -- [lindex $file_states($path) 0] {
A? -
M? -
T_ -
D? {
lappend pathList $path
if {$path eq $current_diff_path} {
@ -296,6 +301,7 @@ proc add_helper {txt paths} {
_O -
?M -
?D -
?T -
U? {
lappend pathList $path
if {$path eq $current_diff_path} {
@ -336,6 +342,7 @@ proc do_add_all {} {
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
?T -
?D {lappend paths $path}
}
}
@ -353,6 +360,7 @@ proc revert_helper {txt paths} {
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
?T -
?D {
lappend pathList $path
if {$path eq $current_diff_path} {
@ -409,11 +417,11 @@ proc do_revert_selection {} {
if {[array size selected_paths] > 0} {
revert_helper \
{Reverting selected files} \
[mc "Reverting selected files"] \
[array names selected_paths]
} elseif {$current_diff_path ne {}} {
revert_helper \
"Reverting [short_path $current_diff_path]" \
[mc "Reverting %s" [short_path $current_diff_path]] \
[list $current_diff_path]
}
}