Fixed issue #1223: Workaround endless waiting when git.exe already exited

Sync Dialog use buffer, learnt from Progress Dialog

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>