summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git/index/base.py10
-rw-r--r--lib/git/remote.py9
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py
index bfbcf841..ff01a3a4 100644
--- a/lib/git/index/base.py
+++ b/lib/git/index/base.py
@@ -1021,14 +1021,14 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
checked_out_files = list()
for path in paths:
- path = self._to_relative_path(path)
+ co_path = to_native_path_linux(self._to_relative_path(path))
# if the item is not in the index, it could be a directory
path_is_directory = False
try:
- self.entries[(path, 0)]
+ self.entries[(co_path, 0)]
except KeyError:
- dir = path
+ dir = co_path
if not dir.endswith('/'):
dir += '/'
for entry in self.entries.itervalues():
@@ -1043,9 +1043,9 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
# END path exception handlnig
if not path_is_directory:
- self._write_path_to_stdin(proc, path, path, make_exc,
+ self._write_path_to_stdin(proc, co_path, path, make_exc,
fprogress, read_from_stdout=False)
- checked_out_files.append(path)
+ checked_out_files.append(co_path)
# END path is a file
# END for each path
self._flush_stdin_and_wait(proc, ignore_stdout=True)
diff --git a/lib/git/remote.py b/lib/git/remote.py
index 8c75b1db..54e1b210 100644
--- a/lib/git/remote.py
+++ b/lib/git/remote.py
@@ -7,6 +7,7 @@
from exc import GitCommandError
from objects import Commit
+from ConfigParser import NoOptionError
from git.util import (
LazyMixin,
@@ -435,7 +436,13 @@ class Remote(LazyMixin, Iterable):
if attr == "_config_reader":
return super(Remote, self).__getattr__(attr)
- return self._config_reader.get(attr)
+ # sometimes, probably due to a bug in python itself, we are being called
+ # even though a slot of the same name exists
+ try:
+ return self._config_reader.get(attr)
+ except NoOptionError:
+ return super(Remote, self).__getattr__(attr)
+ # END handle exception
def _config_section_name(self):
return 'remote "%s"' % self.name