Преглед изворни кода

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
 then
     echo "Auto-tidying perl changes..."
     echo "Auto-tidying perl changes..."
     perltidy -b $to_tidy
     perltidy -b $to_tidy
-    git add $to_tidy
+    git update-index --add $to_tidy
     echo "Done."
     echo "Done."
 fi
 fi