* ho/dashless:
tests: use "git xyzzy" form (t7200 - t9001)
tests: use "git xyzzy" form (t7000 - t7199)
tests: use "git xyzzy" form (t3600 - t6999)
tests: use "git xyzzy" form (t0000 - t3599)
'git foo' program identifies itself without dash in die() messages
Start conforming code to "git subcmd" style
@ -13,7 +13,7 @@ even if a plain file is in the working tree if core.symlinks is false.'
@@ -13,7 +13,7 @@ even if a plain file is in the working tree if core.symlinks is false.'
test "$(git config branch.my7.merge)" = refs/heads/o/o'
@ -209,7 +209,7 @@ EOF
@@ -209,7 +209,7 @@ EOF
test_expect_success \
'git checkout -b g/h/i -l should create a branch and a log' \
'GIT_COMMITTER_DATE="2005-05-26 23:30" \
git-checkout -b g/h/i -l master &&
git checkout -b g/h/i -l master &&
test -f .git/refs/heads/g/h/i &&
test -f .git/logs/refs/heads/g/h/i &&
diff expect .git/logs/refs/heads/g/h/i'
@ -228,7 +228,7 @@ test_expect_success 'autosetuprebase local on a tracked local branch' '
@@ -228,7 +228,7 @@ test_expect_success 'autosetuprebase local on a tracked local branch' '
@ -240,7 +240,7 @@ test_expect_success 'autosetuprebase always on a tracked local branch' '
@@ -240,7 +240,7 @@ test_expect_success 'autosetuprebase always on a tracked local branch' '
@ -252,7 +252,7 @@ test_expect_success 'autosetuprebase remote on a tracked local branch' '
@@ -252,7 +252,7 @@ test_expect_success 'autosetuprebase remote on a tracked local branch' '
@ -264,7 +264,7 @@ test_expect_success 'autosetuprebase never on a tracked local branch' '
@@ -264,7 +264,7 @@ test_expect_success 'autosetuprebase never on a tracked local branch' '
@ -276,7 +276,7 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '
@@ -276,7 +276,7 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '
test "$(git config branch.myr5.remote)" = local &&
test "$(git config branch.myr5.merge)" = refs/heads/master &&
@ -287,7 +287,7 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '
@@ -287,7 +287,7 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '
@ -341,7 +341,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
@@ -341,7 +341,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
@ -362,7 +362,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '
@@ -362,7 +362,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '
@ -373,7 +373,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '
@@ -373,7 +373,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '
@ -384,7 +384,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '
@@ -384,7 +384,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '
@ -395,7 +395,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '
@@ -395,7 +395,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '
@ -406,7 +406,7 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '
@@ -406,7 +406,7 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '
@ -417,7 +417,7 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '
@@ -417,7 +417,7 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '
@ -111,7 +111,7 @@ test_expect_success 'fetch must not resolve short tag name' '
@@ -111,7 +111,7 @@ test_expect_success 'fetch must not resolve short tag name' '
test_expect_success 'fetch must not resolve short remote name' '
@ -34,7 +34,7 @@ test_expect_success 'upload-pack fails due to error in pack-objects' '
@@ -34,7 +34,7 @@ test_expect_success 'upload-pack fails due to error in pack-objects' '
@ -52,7 +52,7 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
@@ -52,7 +52,7 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
test_expect_success 'result is really identical' '
@ -47,7 +47,7 @@ test_expect_success 'result is really identical' '
@@ -47,7 +47,7 @@ test_expect_success 'result is really identical' '
'
test_expect_success 'rewrite, renaming a specific file' '
git-filter-branch -f --tree-filter "mv d doh || :" HEAD
git filter-branch -f --tree-filter "mv d doh || :" HEAD
'
test_expect_success 'test that the file was renamed' '
@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
@@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
'
test_expect_success 'rewrite, renaming a specific directory' '
git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
'
test_expect_success 'test that the directory was renamed' '
@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
@@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
git tag oldD HEAD~4
test_expect_success 'rewrite one branch, keeping a side branch' '
git branch modD oldD &&
git-filter-branch -f --tree-filter "mv b boh || :" D..modD
git filter-branch -f --tree-filter "mv b boh || :" D..modD
'
test_expect_success 'common ancestor is still common (unchanged)' '
test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
git-filter-branch -f --index-filter \
git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
@@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
test_expect_success 'stops when msg filter fails' '
old=$(git rev-parse HEAD) &&
test_must_fail git-filter-branch -f --msg-filter false HEAD &&
test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
'
@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
@@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
git-filter-branch -f --msg-filter "cat; \
git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author &&
@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
@@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
@ -22,25 +22,25 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
@@ -22,25 +22,25 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
'
test_expect_success 'listing all tags in an empty tree should output nothing' '
test `git-tag -l | wc -l` -eq 0 &&
test `git-tag | wc -l` -eq 0
test `git tag -l | wc -l` -eq 0 &&
test `git tag | wc -l` -eq 0
'
test_expect_success 'looking for a tag in an empty tree should fail' \
'! (tag_exists mytag)'
test_expect_success 'creating a tag in an empty tree should fail' '
test_must_fail git-tag mynotag &&
test_must_fail git tag mynotag &&
! tag_exists mynotag
'
test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
test_must_fail git-tag mytaghead HEAD &&
test_must_fail git tag mytaghead HEAD &&
! tag_exists mytaghead
'
test_expect_success 'creating a tag for an unknown revision should fail' '
test_must_fail git-tag mytagnorev aaaaaaaaaaa &&
test_must_fail git tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
'
@ -54,32 +54,32 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
@@ -54,32 +54,32 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
'
test_expect_success 'listing all tags if one exists should succeed' '
git-tag -l &&
git-tag
git tag -l &&
git tag
'
test_expect_success 'listing all tags if one exists should output that tag' '
test `git-tag -l` = mytag &&
test `git-tag` = mytag
test `git tag -l` = mytag &&
test `git tag` = mytag
'
# pattern matching:
test_expect_success 'listing a tag using a matching pattern should succeed' \
'git-tag -l mytag'
'git tag -l mytag'
test_expect_success \
'listing a tag using a matching pattern should output that tag' \
'test `git-tag -l mytag` = mytag'
'test `git tag -l mytag` = mytag'
# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
'listing tags using a non-matching pattern should suceed' \
'git-tag -l xxx'
'git tag -l xxx'
test_expect_success \
'listing tags using a non-matching pattern should output nothing' \
'trying to create a tag with a non-valid name should fail' '
test `git-tag -l | wc -l` -eq 1 &&
test `git tag -l | wc -l` -eq 1 &&
test_must_fail git tag "" &&
test_must_fail git tag .othertag &&
test_must_fail git tag "other tag" &&
test_must_fail git tag "othertag^" &&
test_must_fail git tag "other~tag" &&
test `git-tag -l | wc -l` -eq 1
test `git tag -l | wc -l` -eq 1
'
test_expect_success 'creating a tag using HEAD directly should succeed' '
@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
@@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
test_expect_success 'trying to delete an unknown tag should fail' '
! tag_exists unknown-tag &&
test_must_fail git-tag -d unknown-tag
test_must_fail git tag -d unknown-tag
'
cat >expect <<EOF
@ -117,7 +117,7 @@ EOF
@@ -117,7 +117,7 @@ EOF
test_expect_success \
'trying to delete tags without params should succeed and do nothing' '
test_must_fail git tag -v signed-tag annotated-tag file-signed-tag
'
test_expect_success 'verifying a forged tag should fail' '
@ -744,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' '
@@ -744,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' '
@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
@@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
)
'
test_expect_success 'git-clean with out of work tree absolute path' '
test_expect_success 'git clean with out of work tree absolute path' '
@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
@@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
)
'
test_expect_success 'git-clean -d with prefix and path' '
test_expect_success 'git clean -d with prefix and path' '
test_expect_success 'status should fail for unmapped paths' '
if git-submodule status
if git submodule status
then
echo "[OOPS] submodule status succeeded"
false
@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
@@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
'
test_expect_success 'status should only print one line' '
lines=$(git-submodule status | wc -l) &&
lines=$(git submodule status | wc -l) &&
test $lines = 1
'
test_expect_success 'status should initially be "missing"' '
git-submodule status | grep "^-$rev1"
git submodule status | grep "^-$rev1"
'
test_expect_success 'init should register submodule url in .git/config' '
git-submodule init &&
git submodule init &&
url=$(git config submodule.example.url) &&
if test "$url" != "git://example.com/init.git"
then
@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '
@@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '
test_expect_success 'update should fail when path is used by a file' '
echo "hello" >init &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
@@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
test_expect_success 'update should fail when path is used by a nonempty directory' '
mkdir init &&
echo "hello" >init/a &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
@@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
test_expect_success 'update should work when path is an empty dir' '
rm -rf init &&
mkdir init &&
git-submodule update &&
git submodule update &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
@@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
'
test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'
test_expect_success 'status should be "modified" after submodule commit' '
cd init &&
echo b >b &&
git add b &&
git-commit -m "submodule commit 2" &&
git commit -m "submodule commit 2" &&
rev2=$(git rev-parse HEAD) &&
cd .. &&
if test -z "$rev2"
@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
@@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
git-submodule status | grep "^+$rev2"
git submodule status | grep "^+$rev2"
'
test_expect_success 'the --cached sha1 should be rev1' '
git-submodule --cached status | grep "^+$rev1"
git submodule --cached status | grep "^+$rev1"
'
test_expect_success 'git diff should report the SHA1 of the new submodule commit' '
git-diff | grep "^+Subproject commit $rev2"
git diff | grep "^+Subproject commit $rev2"
'
test_expect_success 'update should checkout rev1' '
git-submodule update init &&
git submodule update init &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
@@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
'
test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'
test_expect_success 'checkout superproject with subproject already present' '