Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d27cd97

Browse filesBrowse files
committed
Handle indented config sections
This brings over some new code from RawConfigParser that handles lines that start with spaces but are also sections themselves, eg: [color] ui = auto [color "branch"] Previously this would cause a traceback. (https://bugzilla.redhat.com/show_bug.cgi?id=706218)
1 parent b306169 commit d27cd97
Copy full SHA for d27cd97

1 file changed

+5Lines changed: 5 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/config.py‎

Copy file name to clipboardExpand all lines: git/config.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ def _read(self, fp, fpname):
216216
if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR":
217217
# no leading whitespace
218218
continue
219+
# continuation line?
220+
if line[0].isspace() and cursect is not None and optname:
221+
value = line.strip()
222+
if value:
223+
cursect[optname] = "%s\n%s" % (cursect[optname], value)
219224
else:
220225
# is it a section header?
221226
mo = self.SECTCRE.match(line)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.