Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,20 @@ impl State {

cmd.current_dir(self.repo.workdir().expect("No workdir"));

cmd.stdin(Stdio::piped());
// Previously `Stdio::pipe()` was used here, likely causing
// https://github.com/altsem/gitu/issues/215 and similar issues.
cmd.stdin(Stdio::inherit());
// Redirect stderr so we can capture it via `Child::wait_with_output()`
cmd.stderr(Stdio::piped());

// git will have staircased output in raw mode (issue #290)
// disable raw mode temporarily for the git command
term.backend().disable_raw_mode()?;

// If we don't show the cursor prior spawning (thus restore the default
// state), the cursor may be missing in $EDITOR.
term.show_cursor()?;

let child = cmd.spawn()?;

let out = child.wait_with_output()?;
Expand Down
Loading