diff options
author | Benedikt Morbach <benedikt.morbach@googlemail.com> | 2015-04-21 13:28:13 +0200 |
---|---|---|
committer | Benedikt Morbach <benedikt.morbach@googlemail.com> | 2015-04-21 13:28:13 +0200 |
commit | bccdb483aaa7235b85a49f2c208ee1befd2706dd (patch) | |
tree | 0c003a8bb66f0a110f045d97fb16768979714aac /git/test/lib/helper.py | |
parent | 5fe80b03196b1d2421109fad5b456ba7ae4393e2 (diff) | |
download | gitpython-bccdb483aaa7235b85a49f2c208ee1befd2706dd.tar.gz |
test: Make git-daemon only listen on localhost
No reason to expose a daemon to all interfaces when it is only used for
tests, which connect to localhost anyway.
I'd love to use localhost here instead, but the git-daemon man page points out:
If IPv6 is not supported, then --listen=hostname is also not
supported and --listen must be given an IPv4 address.
I don't know of a way to check if git has ipv6 support, but 127.0.0.1
should be around for the foreseeable future
Diffstat (limited to 'git/test/lib/helper.py')
-rw-r--r-- | git/test/lib/helper.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py index 541b972d..77ab82ff 100644 --- a/git/test/lib/helper.py +++ b/git/test/lib/helper.py @@ -200,7 +200,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref): temp_dir = osp(_mktemp()) # On windows, this will fail ... we deal with failures anyway and default to telling the user to do it try: - gd = Git().daemon(temp_dir, enable='receive-pack', as_process=True) + gd = Git().daemon(temp_dir, enable='receive-pack', listen='127.0.0.1', as_process=True) # yes, I know ... fortunately, this is always going to work if sleep time is just large enough time.sleep(0.5) except Exception: |