File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1683,14 +1683,14 @@ class GitUtils(object):
16831683 def get_config_settings (repo_working_dir ):
16841684 output = ''
16851685 try :
1686- output = subproc .check_output ('git config --list' .split (),
1686+ output = subproc .check_output ('git config --list --null ' .split (),
16871687 cwd = repo_working_dir )
16881688 except subprocess .CalledProcessError as e : # pragma: no cover
16891689 raise SystemExit ('fatal: {}' .format (e ))
16901690
16911691 # FIXME: Ignores multi-valued keys, just let them overwrite for now
1692- return dict (line .split (b'= ' , maxsplit = 1 )
1693- for line in output .strip ().split (b"\n " ) )
1692+ return dict (item .split (b'\n ' , maxsplit = 1 )
1693+ for item in output .strip ().split (b"\0 " ) if item )
16941694
16951695 @staticmethod
16961696 def get_blob_sizes (quiet = False ):
Original file line number Diff line number Diff line change @@ -895,4 +895,15 @@ test_expect_success 'origin refs without origin remote does not die' '
895895 )
896896'
897897
898+ test_expect_success ' multi-line config value' '
899+ test_create_repo multiline_config &&
900+ (
901+ cd multiline_config &&
902+
903+ git config set test.test "test
904+ test" &&
905+ git filter-repo --force
906+ )
907+ '
908+
898909test_done
You can’t perform that action at this time.
0 commit comments