git-annex/Remote
Joey Hess f07af03018
Run ssh with -n whenever input is not being piped into it
... to avoid it consuming stdin that it shouldn't.

This fixes git-annex-checkpresentkey --batch remote, which didn't output
results for all keys passed into it.

Other git-annex commands that communicate with a remote over ssh may also
have been consuming stdin that they shouldn't have, which could have
impacted using them in eg, shell scripts. For example, a shell script
reading files from stdin and passing them to git annex drop would be
impacted by this bug, whenever git annex drop ran git-annex-shell
checkpresent, it would consume part/all of the stdin that the shell script
was supposed to consume.

Fixed by adding a ConsumeStdin parameter to Annex.Ssh.sshOptions, which
is used throughout git-annex to run ssh (in order for ssh connection
caching to work). Every call site was checked to see if it used
CreatePipe for stdin, and if not was marked NoConsumeStdin.
2017-02-15 15:08:46 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External implementation of peer-to-peer protocol 2016-11-17 18:30:50 -04:00
Helper Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
Rsync remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
WebDAV WebDAV: Remove a bogus trailing slash from the end of the url to the temporary store location for a key. Thanks, wzhd. 2016-02-09 11:50:40 -04:00
BitTorrent.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
Bup.hs Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
Ddar.hs Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
Directory.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00
External.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00
GCrypt.hs Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
Git.hs Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
Glacier.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00
Hook.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00
List.hs stub Remote.P2P 2016-12-06 12:27:58 -04:00
P2P.hs Increase default cost for p2p remotes from 200 to 1000. This makes git-annex prefer transferring data from special remotes when possible. 2017-01-06 15:23:30 -04:00
Rsync.hs Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
S3.hs S3: Fix check of uuid file stored in bucket, which was not working. 2017-02-13 15:35:24 -04:00
Tahoe.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00
Web.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
WebDAV.hs add SetupStage parameter to RemoteType.setup 2017-02-07 14:55:58 -04:00