瀏覽代碼

Update pre-commit

Use git update-index when updating files
Nicolas R 2 年之前
父節點
當前提交
fa981f67ac
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      git-hooks/pre-commit

+ 1 - 1
git-hooks/pre-commit

@@ -9,6 +9,6 @@ if [ $to_tidy  ]
 then
     echo "Auto-tidying perl changes..."
     perltidy -b $to_tidy
-    git add $to_tidy
+    git update-index --add $to_tidy
     echo "Done."
 fi