The amend command breaks when your git editor path (git editor core.config) contains spaces. For example, on my windows machine this option is configured to
"C:\\Program Files\\Sublime Text 3\\subl.exe" -w
Calling split() on this string obviously won't end well. This PR uses shlex.split() (thanks ChatGPT!) which returns the array
['"C:\\Program Files\\Sublime Text 3\\subl.exe"', '-w']
The
amend
command breaks when your git editor path (git editor core.config
) contains spaces. For example, on my windows machine this option is configured toCalling
split()
on this string obviously won't end well. This PR usesshlex.split()
(thanks ChatGPT!) which returns the arrayas expected.