From: Alexander Gavrilov Date: Sun, 16 Nov 2008 18:46:48 +0000 (+0300) Subject: git-gui: Fix the after callback execution in rescan. X-Git-Tag: v1.6.1-rc1~39^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7cf4566f48b7f17c68ab215a9ca6ef7792d9d791?ds=sidebyside;hp=7cf4566f48b7f17c68ab215a9ca6ef7792d9d791 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 Signed-off-by: Shawn O. Pearce ---