mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
Fix specify config file not work while installing
Via `pre-commit install -c .other-config.yaml`
This commit is contained in:
parent
8b14c6c5ae
commit
f9a849abcc
5 changed files with 11 additions and 8 deletions
|
|
@ -9,14 +9,14 @@ do
|
|||
# Check that the ancestor has at least one parent
|
||||
git rev-list --max-parents=0 "$local_sha" | grep "$first_ancestor" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
args="run --all-files"
|
||||
args="--all-files"
|
||||
else
|
||||
source=$(git rev-parse "$first_ancestor"^)
|
||||
args="run --origin $local_sha --source $source"
|
||||
args="--origin $local_sha --source $source"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
args="run --origin $local_sha --source $remote_sha"
|
||||
args="--origin $local_sha --source $remote_sha"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue