Skip to content

Commit e1379c5

Browse files
committed
fix commit failure under cygwin/git
1 parent 2146b2f commit e1379c5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

commit.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ def message_done(self, message):
121121
message_file.close()
122122
self.message_file = message_file
123123
# and actually commit
124-
self.run_command(['git', 'commit', '-F', message_file.name, self.extra_options],
125-
self.commit_done, working_dir=self.working_dir)
124+
with open(message_file.name, 'r') as fp:
125+
self.run_command(['git', 'commit', '-F', '-', self.extra_options],
126+
self.commit_done, working_dir=self.working_dir, stdin=fp.read())
126127

127-
def commit_done(self, result):
128+
def commit_done(self, result, **kwargs):
128129
os.remove(self.message_file.name)
129130
self.panel(result)
130131

0 commit comments

Comments
 (0)