author | Alexander Gavrilov <angavrilov@gmail.com> | |
Sun, 16 Nov 2008 18:46:48 +0000 (21:46 +0300) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 16 Nov 2008 21:33:09 +0000 (13:33 -0800) | ||
commit | 7cf4566f48b7f17c68ab215a9ca6ef7792d9d791 | |
tree | 324461a7369958c83b0d8d0486b5354597501bfa | tree | snapshot |
parent | 153ad78b5074b37215654b1ccb59e67dc5831883 | commit | diff |
git-gui: Fix the after callback execution in rescan.
The rescan function receives a callback command
as its parameter, which is supposed to be executed
after the scan finishes. It is generally used to
update status. However, rescan may initiate a
loading of a diff, which always calls ui_ready after
completion. If the after handler is called before
that, ui_ready will override the new status.
This commit ensures that the after callback is
properly threaded through the diff machinery.
Since it uncovered the fact that force_first_diff
actually didn't work due to an undeclared global
variable, and the desired effects appeared only
because of the race condition between the diff
system and the rescan callback, I also reimplement
this function to make it behave as originally
intended.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
The rescan function receives a callback command
as its parameter, which is supposed to be executed
after the scan finishes. It is generally used to
update status. However, rescan may initiate a
loading of a diff, which always calls ui_ready after
completion. If the after handler is called before
that, ui_ready will override the new status.
This commit ensures that the after callback is
properly threaded through the diff machinery.
Since it uncovered the fact that force_first_diff
actually didn't work due to an undeclared global
variable, and the desired effects appeared only
because of the race condition between the diff
system and the rescan callback, I also reimplement
this function to make it behave as originally
intended.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history | |
lib/diff.tcl | diff | blob | history |