aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/tools/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs
index d6c448f3b..bc550c597 100644
--- a/crates/tools/src/lib.rs
+++ b/crates/tools/src/lib.rs
@@ -136,7 +136,9 @@ pub fn install_format_hook() -> Result<()> {
136 r#"#!/bin/sh 136 r#"#!/bin/sh
137 137
138cargo format 138cargo format
139git update-index --add ."# 139for path in $( git diff --name-only --cached ); do
140 git update-index --add $path
141done"#
140 )?; 142 )?;
141 } else { 143 } else {
142 return Err(Error::new(ErrorKind::AlreadyExists, "Git hook already created").into()); 144 return Err(Error::new(ErrorKind::AlreadyExists, "Git hook already created").into());