summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-27 17:09:41 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-28 03:35:38 +0200
commit4cede2368aa980e30340f0ed0a1906d65fe1046c (patch)
treee541497eea1299f461daec74124787d6c8e76d26
parente61439b3018b0b9a8eb43e59d0d7cf32041e2fed (diff)
downloadgitpython-4cede2368aa980e30340f0ed0a1906d65fe1046c.tar.gz
Win, #519: Ensure fixtures & bashscript checked-out eol=lf
+ FIX all Diff TCs.
-rw-r--r--.appveyor.yml2
-rw-r--r--.gitattributes2
-rw-r--r--git/compat.py4
-rw-r--r--git/index/fun.py2
4 files changed, 6 insertions, 4 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index da91552e..0eabb509 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -35,7 +35,7 @@ install:
#
- |
uname -a
- where git git-daemon python pip
+ where git git-daemon python pip pip3 pip34
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..872b8eb4
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+git/test/fixtures/* eol=lf
+init-tests-after-clone.sh
diff --git a/git/compat.py b/git/compat.py
index dced3a5f..cbfb5785 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -88,9 +88,9 @@ class UnicodeMixin(object):
"""Mixin class to handle defining the proper __str__/__unicode__
methods in Python 2 or 3."""
- if sys.version_info[0] >= 3: # Python 3
+ if PY3:
def __str__(self):
return self.__unicode__()
else: # Python 2
def __str__(self):
- return self.__unicode__().encode('utf8')
+ return self.__unicode__().encode(defenc)
diff --git a/git/index/fun.py b/git/index/fun.py
index 1e931b7c..80db46b1 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -76,7 +76,7 @@ def run_commit_hook(name, index):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=index.repo.working_dir,
- close_fds=(is_posix),
+ close_fds=is_posix,
creationflags=PROC_CREATIONFLAGS,)
stdout, stderr = cmd.communicate()
cmd.stdout.close()