mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
More convenient run_with_output
This commit is contained in:
parent
33df947d62
commit
1b6acc391a
3 changed files with 16 additions and 19 deletions
|
@ -14,7 +14,7 @@ pub fn run_hook() -> Result<()> {
|
|||
let diff = run_with_output("git diff --diff-filter=MAR --name-only --cached", ".")?;
|
||||
|
||||
let root = project_root();
|
||||
for line in String::from_utf8(diff.stdout)?.lines() {
|
||||
for line in diff.lines() {
|
||||
run(&format!("git update-index --add {}", root.join(line).to_string_lossy()), ".")?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue