Merge branch 'maint' of git://git.spearce.org/git-gui into maint
* 'maint' of git://git.spearce.org/git-gui: git-gui: work from the .git dir git-gui: Fix applying a line when all following lines are deletions git-gui: Correct file_states when unstaging partly staged entry git-gui: Fix gitk for branch whose name matches local file git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync git-gui: handle really long error messages in updateindex. git-gui: Add hotkeys for "Unstage from commit" and "Revert changes" git-gui: Makefile: consolidate .FORCE-* targets
This commit is contained in:
@ -235,6 +235,8 @@ proc _get_recentrepos {} {
|
||||
foreach p [get_config gui.recentrepo] {
|
||||
if {[_is_git [file join $p .git]]} {
|
||||
lappend recent $p
|
||||
} else {
|
||||
_unset_recentrepo $p
|
||||
}
|
||||
}
|
||||
return [lsort $recent]
|
||||
@ -243,6 +245,7 @@ proc _get_recentrepos {} {
|
||||
proc _unset_recentrepo {p} {
|
||||
regsub -all -- {([()\[\]{}\.^$+*?\\])} $p {\\\1} p
|
||||
git config --global --unset gui.recentrepo "^$p\$"
|
||||
load_config 1
|
||||
}
|
||||
|
||||
proc _append_recentrepos {path} {
|
||||
@ -261,6 +264,7 @@ proc _append_recentrepos {path} {
|
||||
|
||||
lappend recent $path
|
||||
git config --global --add gui.recentrepo $path
|
||||
load_config 1
|
||||
|
||||
while {[llength $recent] > 10} {
|
||||
_unset_recentrepo [lindex $recent 0]
|
||||
|
@ -664,6 +664,7 @@ proc apply_line {x y} {
|
||||
}
|
||||
set i_l $next_l
|
||||
}
|
||||
set patch "$patch$pre_context"
|
||||
set patch "@@ -$hln,$n +$hln,[eval expr $n $sign 1] @@\n$patch"
|
||||
|
||||
if {[catch {
|
||||
|
@ -14,29 +14,31 @@ proc _close_updateindex {fd after} {
|
||||
toplevel $w
|
||||
wm title $w [strcat "[appname] ([reponame]): " [mc "Index Error"]]
|
||||
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
|
||||
pack [label $w.msg \
|
||||
-justify left \
|
||||
-anchor w \
|
||||
-text [strcat \
|
||||
[mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."] \
|
||||
"\n\n$err"] \
|
||||
] -anchor w
|
||||
set s [mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."]
|
||||
text $w.msg -yscrollcommand [list $w.vs set] \
|
||||
-width [string length $s] -relief flat \
|
||||
-borderwidth 0 -highlightthickness 0 \
|
||||
-background [$w cget -background]
|
||||
$w.msg tag configure bold -font font_uibold -justify center
|
||||
scrollbar $w.vs -command [list $w.msg yview]
|
||||
$w.msg insert end $s bold \n\n$err {}
|
||||
$w.msg configure -state disabled
|
||||
|
||||
frame $w.buttons
|
||||
button $w.buttons.continue \
|
||||
button $w.continue \
|
||||
-text [mc "Continue"] \
|
||||
-command [list destroy $w]
|
||||
pack $w.buttons.continue -side right -padx 5
|
||||
button $w.buttons.unlock \
|
||||
button $w.unlock \
|
||||
-text [mc "Unlock Index"] \
|
||||
-command "destroy $w; _delete_indexlock"
|
||||
pack $w.buttons.unlock -side right
|
||||
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
||||
grid $w.msg - $w.vs -sticky news
|
||||
grid $w.unlock $w.continue - -sticky se -padx 2 -pady 2
|
||||
grid columnconfigure $w 0 -weight 1
|
||||
grid rowconfigure $w 0 -weight 1
|
||||
|
||||
wm protocol $w WM_DELETE_WINDOW update
|
||||
bind $w.buttons.continue <Visibility> "
|
||||
bind $w.continue <Visibility> "
|
||||
grab $w
|
||||
focus $w.buttons.continue
|
||||
focus %W
|
||||
"
|
||||
tkwait window $w
|
||||
|
||||
|
Reference in New Issue
Block a user