Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
repo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YongjieWang
repo
Commits
9ae78267
Commit
9ae78267
authored
Sep 14, 2015
by
Matthias Putz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portable: fix GIT_EDITOR call with spaces on Windows
parent
3bebba1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
editor.py
editor.py
+4
-2
portable.py
portable.py
+11
-0
No files found.
editor.py
View file @
9ae78267
...
...
@@ -15,6 +15,7 @@
from
__future__
import
print_function
import
os
import
portable
import
re
import
sys
import
subprocess
...
...
@@ -83,8 +84,9 @@ least one of these before using this command.""", file=sys.stderr)
fd
=
None
if
re
.
compile
(
"^.*[$
\t
'].*$"
)
.
match
(
editor
):
args
=
[
editor
+
' "$@"'
,
'sh'
]
shell
=
True
# args = [editor + ' "$@"', 'sh']
# shell = True
(
args
,
shell
)
=
portable
.
prepare_editor_args
(
editor
)
else
:
args
=
[
editor
]
shell
=
False
...
...
portable.py
View file @
9ae78267
...
...
@@ -274,3 +274,14 @@ def WaitForProcess():
if
child_process
:
child_process
.
stdin
.
close
()
child_process
.
wait
()
def
prepare_editor_args
(
editor
):
if
isUnix
():
args
=
[
editor
+
' "$@"'
,
'sh'
]
shell
=
True
else
:
editor
=
re
.
sub
(
'["
\'
]'
,
''
,
editor
)
args
=
editor
.
rsplit
()
shell
=
False
return
(
args
,
shell
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment