diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-23 11:24:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-23 12:48:26 -0800 |
commit | d46f476cb26f647e4571b5ccfba516d30ee06c63 (patch) | |
tree | 5ffcfbe4e448eb2729b09b552c4cba82a30fec75 /Documentation/git-pull.txt | |
parent | Sync with 1.7.9.2 (diff) | |
download | tgif-d46f476cb26f647e4571b5ccfba516d30ee06c63.tar.xz |
merge: do not trust fstat(2) too much when checking interactiveness
The heuristic used by "git merge" to decide if it automatically gives an
editor upon clean automerge is to see if the standard input and the
standard output is the same device and is a tty, we are in an interactive
session. "The same device" test was done by comparing fstat(2) result on
the two file descriptors (and they must match), and we asked isatty() only
for the standard input (we insist that they are the same device and there
is no point asking tty-ness of the standard output).
The stat(2) emulation in the Windows port however does not give a usable
value in the st_ino field, so even if the standard output is connected to
something different from the standard input, "The same device" test may
incorrectly return true. To accomodate it, add another isatty() check for
the standard output stream as well.
Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-pull.txt')
0 files changed, 0 insertions, 0 deletions