Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  git-gui: Don't display CR within console windows
  git-gui: Handle progress bars from newer gits
  git-gui: Correctly report failures from git-write-tree

Conflicts:

	lib/commit.tcl
	lib/console.tcl
  • Loading branch information
Shawn O. Pearce committed Oct 21, 2007
2 parents a5bb31f + bbbadf6 commit c9dcc7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/commit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ proc commit_committree {fd_wt curHEAD msg} {
global repo_config

gets $fd_wt tree_id
if {$tree_id eq {} || [catch {close $fd_wt} err]} {
if {[catch {close $fd_wt} err]} {
error_popup [strcat [mc "write-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
Expand Down
2 changes: 1 addition & 1 deletion lib/console.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ method _read {fd after} {
} else {
$w_t delete $console_cr end
$w_t insert end "\n"
$w_t insert end [string range $buf $c $cr]
$w_t insert end [string range $buf $c [expr {$cr - 1}]]
set c $cr
incr c
}
Expand Down
5 changes: 4 additions & 1 deletion lib/status_bar.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ method update_meter {buf} {

set prior [string range $meter 0 $r]
set meter [string range $meter [expr {$r + 1}] end]
if {[regexp "\\((\\d+)/(\\d+)\\)\\s+done\r\$" $prior _j a b]} {
set p "\\((\\d+)/(\\d+)\\)"
if {[regexp ":\\s*\\d+% $p\(?:, done.\\s*\n|\\s*\r)\$" $prior _j a b]} {
update $this $a $b
} elseif {[regexp "$p\\s+done\r\$" $prior _j a b]} {
update $this $a $b
}
}
Expand Down

0 comments on commit c9dcc7f

Please sign in to comment.