aboutsummaryrefslogtreecommitdiff
path: root/compat/strtok_r.c
diff options
context:
space:
mode:
authorHeiko Voigt <hvoigt@hvoigt.net>2011-02-07 21:51:21 +0100
committerJunio C Hamano <gitster@pobox.com>2011-02-07 15:45:54 -0800
commitc9b78400802acb3e02249c44286162edd9ed2b35 (patch)
tree9850c5ac643119b0f348d34171511916cc65ea02 /compat/strtok_r.c
parent19e125498bc417e20f0b8c1014b808654e4acfe4 (diff)
downloadgit-c9b78400802acb3e02249c44286162edd9ed2b35.tar.gz
git-c9b78400802acb3e02249c44286162edd9ed2b35.tar.xz
mingw: make failures to unlink or move raise a question
On Windows in case a program is accessing a file unlink or move operations may fail. To give the user a chance to correct this we simply wait until the user asks us to retry or fail. This is useful because of the following use case which seem to happen rarely but when it does it is a mess: After making some changes the user realizes that he was on the incorrect branch. When trying to change the branch some file is still in use by some other process and git stops in the middle of changing branches. Now the user has lots of files with changes mixed with his own. This is especially confusing on repositories that contain lots of files. Although the recent implementation of automatic retry makes this scenario much more unlikely lets provide a fallback as a last resort. Thanks to Albert Dvornik for disabling the question if users can't see it. If the stdout of the command is connected to a terminal but the stderr has been redirected, the odds are good that the user can't see any question we print out to stderr. This will result in a "mysterious hang" while the app is waiting for user input. It seems better to be conservative, and avoid asking for input whenever the stderr is not a terminal, just like we do for stdin. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Albert Dvornik <dvornik+git@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/strtok_r.c')
0 files changed, 0 insertions, 0 deletions