Properly handle "shared" arg in git.init when it is a bool (#36912)

This commit is contained in:
Erik Johnson 2016-10-11 13:54:15 -05:00 committed by Nicole Thomas
parent bdbf1619cb
commit f3443fb992

View File

@ -1718,7 +1718,8 @@ def init(cwd,
separate_git_dir = str(separate_git_dir)
command.append('--separate-git-dir={0}'.format(separate_git_dir))
if shared is not None:
if isinstance(shared, six.integer_types):
if isinstance(shared, six.integer_types) \
and not isinstance(shared, bool):
shared = '0' + str(shared)
elif not isinstance(shared, six.string_types):
# Using lower here because booleans would be capitalized when