summaryrefslogtreecommitdiff
path: root/contrib/examples/git-whatchanged.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2013-10-14 20:06:14 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-16 11:26:09 -0700
commit47ce115370cba8ebfced696f9997e718c465435d (patch)
tree913b534484ca757bb1fe82060c8d096724af3aa4 /contrib/examples/git-whatchanged.sh
parenthttp: enable keepalive on TCP sockets (diff)
downloadtgif-47ce115370cba8ebfced696f9997e718c465435d.tar.xz
http: use curl's tcp keepalive if available
Commit a15d069 taught git to use curl's SOCKOPTFUNCTION hook to turn on TCP keepalives. However, modern versions of curl have a TCP_KEEPALIVE option, which can do this for us. As an added bonus, the curl code knows how to turn on keepalive for a much wider variety of platforms. The only downside to using this option is that not everybody has a new enough curl. Let's split our keepalive options into three conditionals: 1. With curl 7.25.0 and newer, we rely on curl to do it right. 2. With older curl that still knows SOCKOPTFUNCTION, we use the code from a15d069. 3. Otherwise, we are out of luck, and the call is a no-op. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples/git-whatchanged.sh')
0 files changed, 0 insertions, 0 deletions