Skip to content

Commit

Permalink
git-gui: When calling post-commit hook wrong variable was cleared.
Browse files Browse the repository at this point in the history
Before calling the post-commit hook, the variable "pc_err" is cleared
while later only "pch_error" is used. "pch_error$cmt_id" only appeared in
"upvar"-Statements (which were changed to "global") and was removed.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Jens Lehmann authored and Shawn O. Pearce committed Apr 5, 2009
1 parent 3eb5682 commit f0d4eec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/commit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ A rescan will be automatically started now.
#
set fd_ph [githook_read post-commit]
if {$fd_ph ne {}} {
upvar #0 pch_error$cmt_id pc_err
set pc_err {}
global pch_error
set pch_error {}
fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
fileevent $fd_ph readable \
[list commit_postcommit_wait $fd_ph $cmt_id]
Expand Down Expand Up @@ -470,7 +470,7 @@ A rescan will be automatically started now.
}

proc commit_postcommit_wait {fd_ph cmt_id} {
upvar #0 pch_error$cmt_id pch_error
global pch_error

append pch_error [read $fd_ph]
fconfigure $fd_ph -blocking 1
Expand Down

0 comments on commit f0d4eec

Please sign in to comment.