feat: enable pre-commit checks
This commit is contained in:
parent
c2afb2c5d1
commit
a13a15cbd9
12 changed files with 110 additions and 26 deletions
|
@ -82,7 +82,7 @@
|
|||
uri=''${1}
|
||||
dir=''${2}
|
||||
|
||||
if [[ -z ''${dir} ]]; then
|
||||
if [[ -z ''${dir} ]]; then
|
||||
dir=''$(basename ''${1} .git)
|
||||
fi
|
||||
|
||||
|
@ -102,17 +102,17 @@
|
|||
'')
|
||||
|
||||
(writeShellScriptBin "git-make-relative" ''
|
||||
|
||||
|
||||
gitfile=''${1}
|
||||
|
||||
if [[ -z ''${gitfile} ]]; then
|
||||
if [[ -z ''${gitfile} ]]; then
|
||||
gitfile=".git"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f ''${gitfile} ]]; then
|
||||
if [[ ! -f ''${gitfile} ]]; then
|
||||
echo "file ''${gitfile} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gitdir=$(grep "gitdir:" ''${gitfile} | cut -d: -f2 | xargs)
|
||||
rel_gitdir=$(realpath -s --relative-to=. ''${gitdir})
|
||||
|
@ -123,4 +123,3 @@
|
|||
'')
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue