summaryrefslogtreecommitdiff
path: root/t/t9100-git-svn-basic.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-12-16 02:31:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-16 17:31:00 (GMT)
commita3c45d126012e01b23edc4923ffddffac61d703b (patch)
tree6d8d44acd205a6de811a2fba528e72d3a289f8e1 /t/t9100-git-svn-basic.sh
parent7176a31444ce5ed683dbd75d2e1e2f89018d0100 (diff)
downloadgit-a3c45d126012e01b23edc4923ffddffac61d703b.zip
git-a3c45d126012e01b23edc4923ffddffac61d703b.tar.gz
git-a3c45d126012e01b23edc4923ffddffac61d703b.tar.bz2
t: use nongit() function where applicable
Many tests want to run a command outside of any git repo; with the nongit() function this is now a one-liner. It saves a few lines, but more importantly, it's immediately obvious what the code is trying to accomplish. This doesn't convert every such case in the test suite; it just covers those that want to do a one-off command. Other cases, such as the ones in t4035, are part of a larger scheme of outside-repo files, and it's less confusing for them to stay consistent with the surrounding tests. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9100-git-svn-basic.sh')
-rwxr-xr-xt/t9100-git-svn-basic.sh17
1 files changed, 2 insertions, 15 deletions
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 92a3aa8..8a8ba65 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -17,25 +17,12 @@ case "$GIT_SVN_LC_ALL" in
;;
esac
-deepdir=nothing-above
-ceiling=$PWD
-
test_expect_success 'git svn --version works anywhere' '
- mkdir -p "$deepdir" && (
- GIT_CEILING_DIRECTORIES="$ceiling" &&
- export GIT_CEILING_DIRECTORIES &&
- cd "$deepdir" &&
- git svn --version
- )
+ nongit git svn --version
'
test_expect_success 'git svn help works anywhere' '
- mkdir -p "$deepdir" && (
- GIT_CEILING_DIRECTORIES="$ceiling" &&
- export GIT_CEILING_DIRECTORIES &&
- cd "$deepdir" &&
- git svn help
- )
+ nongit git svn help
'
test_expect_success \