Merge fort-nix/nix-bitcoin#545: test/lib/create-git-repo: fix variable quoting
49e30f7172
test/lib/create-git-repo: fix empty var expansion (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK49e30f7172
Tree-SHA512: 321f01bd8674e7cc91718e9799e3175cb640feb42ebac90588a60cdbe160b705aac4effa4cc229adc41c062c3cdf7ad90317a4dde90665d71141016faf2ce43a
This commit is contained in:
commit
ff04de6972
@ -2,14 +2,14 @@
|
|||||||
(
|
(
|
||||||
# shellcheck disable=SC2154,SC2164
|
# shellcheck disable=SC2154,SC2164
|
||||||
cd "$scriptDir/.."
|
cd "$scriptDir/.."
|
||||||
amend=--amend
|
amend=(--amend)
|
||||||
|
|
||||||
if [[ ! -e .git ]] || ! git rev-parse HEAD 2>/dev/null; then
|
if [[ ! -e .git ]] || ! git rev-parse HEAD 2>/dev/null; then
|
||||||
git init
|
git init
|
||||||
amend=
|
amend=()
|
||||||
fi
|
fi
|
||||||
git add .
|
git add .
|
||||||
if ! git diff --quiet --cached; then
|
if ! git diff --quiet --cached; then
|
||||||
git commit -a "$amend" -m -
|
git commit -a "${amend[@]}" -m -
|
||||||
fi
|
fi
|
||||||
) >/dev/null
|
) >/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user