Skip to content
Snippets Groups Projects
Commit 7d02a6a1 authored by Alexander Blinne's avatar Alexander Blinne
Browse files

Fix pre-commit hooks such that the don't mess up merges

parent 0496fee7
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,10 @@ if git diff-index --quiet HEAD --; then ...@@ -38,6 +38,10 @@ if git diff-index --quiet HEAD --; then
echo "No changes detected. Skipping tests..." echo "No changes detected. Skipping tests..."
sleep 1 sleep 1
exitcode=0 exitcode=0
elif [ -e .git/MERGE_HEAD ]; then
echo "Merge in progress... Testing against the working directory leaving unstages changes intact!"
conda/run_tests.sh --fast
exitcode=$?
else else
git stash -q --keep-index git stash -q --keep-index
conda/run_tests.sh --fast conda/run_tests.sh --fast
......
...@@ -37,6 +37,10 @@ if git diff-index --quiet HEAD --; then ...@@ -37,6 +37,10 @@ if git diff-index --quiet HEAD --; then
echo "No changes detected. Skipping tests..." echo "No changes detected. Skipping tests..."
sleep 1 sleep 1
exitcode=0 exitcode=0
elif [ -e .git/MERGE_HEAD ]; then
echo "Merge in progress... Testing against the working directory leaving unstages changes intact!"
./run-tests.py --fast
exitcode=$?
else else
git stash -q --keep-index git stash -q --keep-index
./run-tests.py --fast ./run-tests.py --fast
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment