summaryrefslogtreecommitdiff
path: root/t/t1306-xdg-files.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-12-20 18:15:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-20 19:30:44 (GMT)
commit3595d10c26db483239d97ca8fc435c1c9dabcfb1 (patch)
treed636f1717684a6433a7e3dadc3c0df10b739f89b /t/t1306-xdg-files.sh
parentf511bc02edc8e2729e7babb1b4caa98684d941bc (diff)
downloadgit-3595d10c26db483239d97ca8fc435c1c9dabcfb1.zip
git-3595d10c26db483239d97ca8fc435c1c9dabcfb1.tar.gz
git-3595d10c26db483239d97ca8fc435c1c9dabcfb1.tar.bz2
t1306: convert `test_might_fail rm` to `rm -f`
The test_must_fail() family of functions (including test_might_fail()) should only be used on git commands. Replace `test_might_fail rm` with `rm -f` so that we don't use `test_might_fail` on a non-git command. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1306-xdg-files.sh')
-rwxr-xr-xt/t1306-xdg-files.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
index 21e139a..dd87b43 100755
--- a/t/t1306-xdg-files.sh
+++ b/t/t1306-xdg-files.sh
@@ -153,7 +153,7 @@ test_expect_success 'Checking attributes in both XDG and local attributes files'
test_expect_success 'Checking attributes in a non-XDG global attributes file' '
- test_might_fail rm .gitattributes &&
+ rm -f .gitattributes &&
echo "f attr_f=test" >"$HOME"/my_gitattributes &&
git config core.attributesfile "$HOME"/my_gitattributes &&
echo "f: attr_f: test" >expected &&
@@ -165,7 +165,7 @@ test_expect_success 'Checking attributes in a non-XDG global attributes file' '
test_expect_success 'write: xdg file exists and ~/.gitconfig doesn'\''t' '
mkdir -p "$HOME"/.config/git &&
>"$HOME"/.config/git/config &&
- test_might_fail rm "$HOME"/.gitconfig &&
+ rm -f "$HOME"/.gitconfig &&
git config --global user.name "write_config" &&
echo "[user]" >expected &&
echo " name = write_config" >>expected &&
@@ -183,8 +183,8 @@ test_expect_success 'write: xdg file exists and ~/.gitconfig exists' '
test_expect_success 'write: ~/.config/git/ exists and config file doesn'\''t' '
- test_might_fail rm "$HOME"/.gitconfig &&
- test_might_fail rm "$HOME"/.config/git/config &&
+ rm -f "$HOME"/.gitconfig &&
+ rm -f "$HOME"/.config/git/config &&
git config --global user.name "write_gitconfig" &&
echo "[user]" >expected &&
echo " name = write_gitconfig" >>expected &&