summaryrefslogtreecommitdiff
path: root/t/t6300-for-each-ref.sh
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2017-01-10 08:49:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-10 20:44:31 (GMT)
commit17938f171f703c28696c7839a910565f0fb32121 (patch)
tree874b5647769e7109ce0277b2dd6314cfee5ba76a /t/t6300-for-each-ref.sh
parent3ba308cb4b4ad0d06fa834a42a9380c877b0c16a (diff)
downloadgit-17938f171f703c28696c7839a910565f0fb32121.zip
git-17938f171f703c28696c7839a910565f0fb32121.tar.gz
git-17938f171f703c28696c7839a910565f0fb32121.tar.bz2
ref-filter: rename the 'strip' option to 'lstrip'
In preparation for the upcoming patch, where we introduce the 'rstrip' option. Rename the 'strip' option to 'lstrip' to remove ambiguity. Signed-off-by: Karthik Nayak <Karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-xt/t6300-for-each-ref.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index c538084..5eb013c 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -51,14 +51,14 @@ test_atom() {
test_atom head refname refs/heads/master
test_atom head refname:short master
-test_atom head refname:strip=1 heads/master
-test_atom head refname:strip=2 master
+test_atom head refname:lstrip=1 heads/master
+test_atom head refname:lstrip=2 master
test_atom head upstream refs/remotes/origin/master
test_atom head upstream:short origin/master
-test_atom head upstream:strip=2 origin/master
+test_atom head upstream:lstrip=2 origin/master
test_atom head push refs/remotes/myfork/master
test_atom head push:short myfork/master
-test_atom head push:strip=1 remotes/myfork/master
+test_atom head push:lstrip=1 remotes/myfork/master
test_atom head objecttype commit
test_atom head objectsize 171
test_atom head objectname $(git rev-parse refs/heads/master)
@@ -141,14 +141,14 @@ test_expect_success 'Check invalid atoms names are errors' '
test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
'
-test_expect_success 'arguments to :strip must be positive integers' '
- test_must_fail git for-each-ref --format="%(refname:strip=0)" &&
- test_must_fail git for-each-ref --format="%(refname:strip=-1)" &&
- test_must_fail git for-each-ref --format="%(refname:strip=foo)"
+test_expect_success 'arguments to :lstrip must be positive integers' '
+ test_must_fail git for-each-ref --format="%(refname:lstrip=0)" &&
+ test_must_fail git for-each-ref --format="%(refname:lstrip=-1)" &&
+ test_must_fail git for-each-ref --format="%(refname:lstrip=foo)"
'
test_expect_success 'stripping refnames too far gives an error' '
- test_must_fail git for-each-ref --format="%(refname:strip=3)"
+ test_must_fail git for-each-ref --format="%(refname:lstrip=3)"
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
@@ -630,8 +630,8 @@ cat >expected <<EOF
master
EOF
-test_expect_success 'Verify usage of %(symref:strip) atom' '
- git for-each-ref --format="%(symref:strip=2)" refs/heads/sym > actual &&
+test_expect_success 'Verify usage of %(symref:lstrip) atom' '
+ git for-each-ref --format="%(symref:lstrip=2)" refs/heads/sym > actual &&
test_cmp expected actual
'