{"thread":{"id":"29610","subject":"[RFC PATCH 0/3] git-p4: move to toplevel","startedAt":"2012-02-12T18:13:40Z","lastAt":"2012-02-14T19:49:10Z","messageCount":16,"participants":["Pete Wyckoff","Luke Diamand","Junio C Hamano","Clemens Buchacher","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"184524","messageId":"1329070423-23761-1-git-send-email-pw@padd.com","threadId":"29610","inReplyTo":null,"subject":"[RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-12T18:13:40Z","receivedAt":"2012-02-12T18:13:40Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"The git-p4 code is in a single python script down in\ncontrib/fast-import now.  I'd like to move it up to the top-level\nsource directory of git to make it easier to build and\ndistribute.  Git-p4 already takes advantage of the git\ninfrastructure for documentation and testing, as well as the\ncommunity support (Junio, many reviewers).\n\nUsers install git-p4 currently by copying the git-p4 script from\ncontrib/fast-import into a local or personal bin directory, and\nsetting up an alias for \"git p4\" to invoke it.  If it is part of\nthe install, the command will be available automatically.  Also,\ndistributions may be more likely to pick it up either as part of\na core git package, or as a separate add-on.  Getting support\nfor python and git-p4 in msysgit is something I'd like to see\nhappen too.\n\nWhile I considered taking this opportunity to split up git-p4\ninto more modular components across multiple files, it seems best\nnow just to do the script move intact.  That effort could come\nlater.  If anyone has a strong preference to do this now, we could.\n\nDeveloper note:  Like all scripts in git, the source file is\ngit-p4.py, which is built with \"make\" to git-p4, substituting the\nspecified path for python in the first line.  Be sure to edit the\nsource file, and to build before running tests.  This is sort of\na pain for existing developers, but hopefully we can get used to it.\n\n\nPete Wyckoff (3):\n  git-p4: move to toplevel\n  git p4: update name in script\n  git p4: use \"git p4\" directly in tests\n\n .gitignore                              |    1 +\n Documentation/git-p4.txt                |   23 +++------\n INSTALL                                 |    3 +\n Makefile                                |    1 +\n contrib/fast-import/git-p4.README       |   13 +++++\n contrib/fast-import/git-p4.bat          |    1 -\n contrib/fast-import/git-p4 => git-p4.py |   14 +++---\n t/lib-git-p4.sh                         |    8 +--\n t/t9800-git-p4-basic.sh                 |   84 +++++++++++++++---------------\n t/t9801-git-p4-branch.sh                |   32 ++++++------\n t/t9802-git-p4-filetype.sh              |   10 ++--\n t/t9803-git-p4-shell-metachars.sh       |   12 ++--\n t/t9804-git-p4-label.sh                 |    6 +-\n t/t9805-git-p4-skip-submit-edit.sh      |   22 ++++----\n t/t9806-git-p4-options.sh               |   28 +++++-----\n t/t9807-git-p4-submit.sh                |   22 ++++----\n t/t9808-git-p4-chdir.sh                 |    6 +-\n t/t9809-git-p4-client-view.sh           |   64 ++++++++++++------------\n 18 files changed, 179 insertions(+), 171 deletions(-)\n create mode 100644 contrib/fast-import/git-p4.README\n delete mode 100644 contrib/fast-import/git-p4.bat\n rename contrib/fast-import/git-p4 => git-p4.py (99%)\n\n-- \n1.7.9.192.ga1d4b\n"},{"id":"184525","messageId":"1329070423-23761-2-git-send-email-pw@padd.com","threadId":"29610","inReplyTo":"1329070423-23761-1-git-send-email-pw@padd.com","subject":"[RFC PATCH 1/3] git-p4: move to toplevel","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-12T18:13:41Z","receivedAt":"2012-02-12T18:13:41Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"Move git-p4 out of contrib/fast-import into the main code base,\naside other foreign SCM tools.\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\n---\n .gitignore                              |    1 +\n Documentation/git-p4.txt                |   23 ++++++++---------------\n INSTALL                                 |    3 +++\n Makefile                                |    1 +\n contrib/fast-import/git-p4.README       |   13 +++++++++++++\n contrib/fast-import/git-p4.bat          |    1 -\n contrib/fast-import/git-p4 => git-p4.py |    0\n t/lib-git-p4.sh                         |    2 +-\n 8 files changed, 27 insertions(+), 17 deletions(-)\n create mode 100644 contrib/fast-import/git-p4.README\n delete mode 100644 contrib/fast-import/git-p4.bat\n rename contrib/fast-import/git-p4 => git-p4.py (100%)\n\ndiff --git a/.gitignore b/.gitignore\nindex 87fcc5f..5a0782f 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -92,6 +92,7 @@\n /git-name-rev\n /git-mv\n /git-notes\n+/git-p4\n /git-pack-redundant\n /git-pack-objects\n /git-pack-refs\ndiff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\nindex 8b92cc0..7757c66 100644\n--- a/Documentation/git-p4.txt\n+++ b/Documentation/git-p4.txt\n@@ -3,7 +3,7 @@ git-p4(1)\n \n NAME\n ----\n-git-p4 - Import from and submit to Perforce repositories\n+'git p4' - Import from and submit to Perforce repositories\n \n \n SYNOPSIS\n@@ -31,13 +31,6 @@ the updated p4 remote branch.\n \n EXAMPLE\n -------\n-* Create an alias for 'git p4', using the full path to the 'git-p4'\n-  script if needed:\n-+\n-------------\n-$ git config --global alias.p4 '!git-p4'\n-------------\n-\n * Clone a repository:\n +\n ------------\n@@ -303,23 +296,23 @@ CLIENT SPEC\n -----------\n The p4 client specification is maintained with the 'p4 client' command\n and contains among other fields, a View that specifies how the depot\n-is mapped into the client repository.  Git-p4 can consult the client\n+is mapped into the client repository.  'Git p4' can consult the client\n spec when given the '--use-client-spec' option or useClientSpec\n variable.\n \n-The full syntax for a p4 view is documented in 'p4 help views'.  Git-p4\n+The full syntax for a p4 view is documented in 'p4 help views'.  'Git p4'\n knows only a subset of the view syntax.  It understands multi-line\n mappings, overlays with '+', exclusions with '-' and double-quotes\n-around whitespace.  Of the possible wildcards, git-p4 only handles\n-'...', and only when it is at the end of the path.  Git-p4 will complain\n+around whitespace.  Of the possible wildcards, 'git p4' only handles\n+'...', and only when it is at the end of the path.  'Git p4' will complain\n if it encounters an unhandled wildcard.\n \n Bugs in the implementation of overlap mappings exist.  If multiple depot\n paths map through overlays to the same location in the repository,\n-git-p4 can choose the wrong one.  This is hard to solve without\n-dedicating a client spec just for git-p4.\n+'git p4' can choose the wrong one.  This is hard to solve without\n+dedicating a client spec just for 'git p4'.\n \n-The name of the client can be given to git-p4 in multiple ways.  The\n+The name of the client can be given to 'git p4' in multiple ways.  The\n variable 'git-p4.client' takes precedence if it exists.  Otherwise,\n normal p4 mechanisms of determining the client are used:  environment\n variable P4CLIENT, a file referenced by P4CONFIG, or the local host name.\ndiff --git a/INSTALL b/INSTALL\nindex 6fa83fe..834fa82 100644\n--- a/INSTALL\n+++ b/INSTALL\n@@ -122,6 +122,9 @@ Issues of note:\n \t  use English. Under autoconf the configure script will do this\n \t  automatically if it can't find libintl on the system.\n \n+\t- Python version 2.6 or later is needed to use the git-p4\n+\t  interface to Perforce.\n+\n  - Some platform specific issues are dealt with Makefile rules,\n    but depending on your specific installation, you may not\n    have all the libraries/tools needed, or you may have\ndiff --git a/Makefile b/Makefile\nindex 87fb30a..f2ff7fd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -436,6 +436,7 @@ SCRIPT_PERL += git-send-email.perl\n SCRIPT_PERL += git-svn.perl\n \n SCRIPT_PYTHON += git-remote-testgit.py\n+SCRIPT_PYTHON += git-p4.py\n \n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\ndiff --git a/contrib/fast-import/git-p4.README b/contrib/fast-import/git-p4.README\nnew file mode 100644\nindex 0000000..d9a7684\n--- /dev/null\n+++ b/contrib/fast-import/git-p4.README\n@@ -0,0 +1,13 @@\n+The git-p4 script moved to the top-level of the git source directory.\n+\n+Invoke it as any other git command, like \"git p4 clone\", for instance.\n+\n+Note that the top-level git-p4.py script is now the source.  It is\n+built using make to git-p4, which will be installed.\n+\n+Windows users can copy the git-p4.py source script directly, possibly\n+invoking it through a batch file called \"git-p4.bat\" in the same folder.\n+It should contain just one line:\n+\n+    @python \"%~d0%~p0git-p4.py\" %*\n+\ndiff --git a/contrib/fast-import/git-p4.bat b/contrib/fast-import/git-p4.bat\ndeleted file mode 100644\nindex 9f97e88..0000000\n--- a/contrib/fast-import/git-p4.bat\n+++ /dev/null\n@@ -1 +0,0 @@\n-@python \"%~d0%~p0git-p4\" %*\ndiff --git a/contrib/fast-import/git-p4 b/git-p4.py\nsimilarity index 100%\nrename from contrib/fast-import/git-p4\nrename to git-p4.py\ndiff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh\nindex a870f9a..49edaae 100644\n--- a/t/lib-git-p4.sh\n+++ b/t/lib-git-p4.sh\n@@ -13,7 +13,7 @@ fi\n \ttest_done\n }\n \n-GITP4=\"$GIT_BUILD_DIR/contrib/fast-import/git-p4\"\n+GITP4=\"$GIT_BUILD_DIR/git-p4\"\n \n # Try to pick a unique port: guess a large number, then hope\n # no more than one of each test is running.\n-- \n1.7.9.192.ga1d4b\n"},{"id":"184526","messageId":"1329070423-23761-3-git-send-email-pw@padd.com","threadId":"29610","inReplyTo":"1329070423-23761-1-git-send-email-pw@padd.com","subject":"[RFC PATCH 2/3] git p4: update name in script","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-12T18:13:42Z","receivedAt":"2012-02-12T18:13:42Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"In messages to the user and comments, change \"git-p4\" to \"git p4\".\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\n---\n git-p4.py |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex a78d9c5..1e27d70 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -988,12 +988,12 @@ class P4Submit(Command, P4UserMap):\n                     print \"The following files should be scheduled for deletion with p4 delete:\"\n                     print \" \".join(filesToDelete)\n                 die(\"Please resolve and submit the conflict manually and \"\n-                    + \"continue afterwards with git-p4 submit --continue\")\n+                    + \"continue afterwards with git p4 submit --continue\")\n             elif response == \"w\":\n                 system(diffcmd + \" > patch.txt\")\n                 print \"Patch saved to patch.txt in %s !\" % self.clientPath\n                 die(\"Please resolve and submit the conflict manually and \"\n-                    \"continue afterwards with git-p4 submit --continue\")\n+                    \"continue afterwards with git p4 submit --continue\")\n \n         system(applyPatchCmd)\n \n@@ -1037,8 +1037,8 @@ class P4Submit(Command, P4UserMap):\n \n             if self.checkAuthorship and not self.p4UserIsMe(p4User):\n                 submitTemplate += \"######## git author %s does not match your p4 account.\\n\" % gitEmail\n-                submitTemplate += \"######## Use git-p4 option --preserve-user to modify authorship\\n\"\n-                submitTemplate += \"######## Use git-p4 config git-p4.skipUserNameCheck hides this message.\\n\"\n+                submitTemplate += \"######## Use option --preserve-user to modify authorship.\\n\"\n+                submitTemplate += \"######## Variable git-p4.skipUserNameCheck hides this message.\\n\"\n \n             separatorLine = \"######## everything below this line is just the diff #######\\n\"\n \n@@ -2106,7 +2106,7 @@ class P4Sync(Command, P4UserMap):\n \n         details[\"change\"] = newestRevision\n \n-        # Use time from top-most change so that all git-p4 clones of\n+        # Use time from top-most change so that all git p4 clones of\n         # the same p4 repo have the same commit SHA1s.\n         res = p4CmdList(\"describe -s %d\" % newestRevision)\n         newestTime = None\n@@ -2349,8 +2349,8 @@ class P4Sync(Command, P4UserMap):\n \n                 changes.sort()\n             else:\n-                # catch \"git-p4 sync\" with no new branches, in a repo that\n-                # does not have any existing git-p4 branches\n+                # catch \"git p4 sync\" with no new branches, in a repo that\n+                # does not have any existing p4 branches\n                 if len(args) == 0 and not self.p4BranchesInGit:\n                     die(\"No remote p4 branches.  Perhaps you never did \\\"git p4 clone\\\" in here.\");\n                 if self.verbose:\n-- \n1.7.9.192.ga1d4b\n"},{"id":"184527","messageId":"1329070423-23761-4-git-send-email-pw@padd.com","threadId":"29610","inReplyTo":"1329070423-23761-1-git-send-email-pw@padd.com","subject":"[RFC PATCH 3/3] git p4: use \"git p4\" directly in tests","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-12T18:13:43Z","receivedAt":"2012-02-12T18:13:43Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"Drop the $GITP4 variable that was used to specify the script in\ncontrib/fast-import/.  The command is called \"git p4\" now, not\n\"git-p4\".  Variables will remain in a section called \"git-p4\".\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\n---\n t/lib-git-p4.sh                    |    8 +--\n t/t9800-git-p4-basic.sh            |   84 ++++++++++++++++++------------------\n t/t9801-git-p4-branch.sh           |   32 +++++++-------\n t/t9802-git-p4-filetype.sh         |   10 ++--\n t/t9803-git-p4-shell-metachars.sh  |   12 +++---\n t/t9804-git-p4-label.sh            |    6 +-\n t/t9805-git-p4-skip-submit-edit.sh |   22 +++++-----\n t/t9806-git-p4-options.sh          |   28 ++++++------\n t/t9807-git-p4-submit.sh           |   22 +++++-----\n t/t9808-git-p4-chdir.sh            |    6 +-\n t/t9809-git-p4-client-view.sh      |   64 ++++++++++++++--------------\n 11 files changed, 146 insertions(+), 148 deletions(-)\n\ndiff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh\nindex 49edaae..b90986c 100644\n--- a/t/lib-git-p4.sh\n+++ b/t/lib-git-p4.sh\n@@ -1,20 +1,18 @@\n #\n-# Library code for git-p4 tests\n+# Library code for git p4 tests\n #\n \n . ./test-lib.sh\n \n if ! test_have_prereq PYTHON; then\n-\tskip_all='skipping git-p4 tests; python not available'\n+\tskip_all='skipping git p4 tests; python not available'\n \ttest_done\n fi\n ( p4 -h && p4d -h ) >/dev/null 2>&1 || {\n-\tskip_all='skipping git-p4 tests; no p4 or p4d'\n+\tskip_all='skipping git p4 tests; no p4 or p4d'\n \ttest_done\n }\n \n-GITP4=\"$GIT_BUILD_DIR/git-p4\"\n-\n # Try to pick a unique port: guess a large number, then hope\n # no more than one of each test is running.\n #\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex 04ee20e..36a7603 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 tests'\n+test_description='git p4 tests'\n \n . ./lib-git-p4.sh\n \n@@ -20,8 +20,8 @@ test_expect_success 'add p4 files' '\n \t)\n '\n \n-test_expect_success 'basic git-p4 clone' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+test_expect_success 'basic git p4 clone' '\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -30,8 +30,8 @@ test_expect_success 'basic git-p4 clone' '\n \t)\n '\n \n-test_expect_success 'git-p4 clone @all' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+test_expect_success 'git p4 clone @all' '\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -40,12 +40,12 @@ test_expect_success 'git-p4 clone @all' '\n \t)\n '\n \n-test_expect_success 'git-p4 sync uninitialized repo' '\n+test_expect_success 'git p4 sync uninitialized repo' '\n \ttest_create_repo \"$git\" &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\ttest_must_fail \"$GITP4\" sync\n+\t\ttest_must_fail git p4 sync\n \t)\n '\n \n@@ -53,13 +53,13 @@ test_expect_success 'git-p4 sync uninitialized repo' '\n # Create a git repo by hand.  Add a commit so that HEAD is valid.\n # Test imports a new p4 repository into a new git branch.\n #\n-test_expect_success 'git-p4 sync new branch' '\n+test_expect_success 'git p4 sync new branch' '\n \ttest_create_repo \"$git\" &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_commit head &&\n-\t\t\"$GITP4\" sync --branch=refs/remotes/p4/depot //depot@all &&\n+\t\tgit p4 sync --branch=refs/remotes/p4/depot //depot@all &&\n \t\tgit log --oneline p4/depot >lines &&\n \t\ttest_line_count = 2 lines\n \t)\n@@ -76,7 +76,7 @@ test_expect_success 'clone two dirs' '\n \t\tp4 add sub2/f2 &&\n \t\tp4 submit -d \"sub2/f2\"\n \t) &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/sub1 //depot/sub2 &&\n+\tgit p4 clone --dest=\"$git\" //depot/sub1 //depot/sub2 &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -94,7 +94,7 @@ test_expect_success 'clone two dirs, @all' '\n \t\tp4 add sub1/f3 &&\n \t\tp4 submit -d \"sub1/f3\"\n \t) &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/sub1@all //depot/sub2@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/sub1@all //depot/sub2@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -112,7 +112,7 @@ test_expect_success 'clone two dirs, @all, conflicting files' '\n \t\tp4 add sub2/f3 &&\n \t\tp4 submit -d \"sub2/f3\"\n \t) &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/sub1@all //depot/sub2@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/sub1@all //depot/sub2@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -134,7 +134,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '\n \texit 1\n \tEOF\n \tchmod 755 \"$badp4dir\"/p4 &&\n-\tPATH=\"$badp4dir:$PATH\" \"$GITP4\" clone --dest=\"$git\" //depot >errs 2>&1 ; retval=$? &&\n+\tPATH=\"$badp4dir:$PATH\" git p4 clone --dest=\"$git\" //depot >errs 2>&1 ; retval=$? &&\n \ttest $retval -eq 1 &&\n \ttest_must_fail grep -q Traceback errs\n '\n@@ -151,8 +151,8 @@ test_expect_success 'add p4 files with wildcards in the names' '\n \t)\n '\n \n-test_expect_success 'wildcard files git-p4 clone' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+test_expect_success 'wildcard files git p4 clone' '\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -164,7 +164,7 @@ test_expect_success 'wildcard files git-p4 clone' '\n '\n \n test_expect_success 'clone bare' '\n-\t\"$GITP4\" clone --dest=\"$git\" --bare //depot &&\n+\tgit p4 clone --dest=\"$git\" --bare //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -209,7 +209,7 @@ test_expect_success 'preserve users' '\n \tp4_add_user alice Alice &&\n \tp4_add_user bob Bob &&\n \tp4_grant_admin alice &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -218,7 +218,7 @@ test_expect_success 'preserve users' '\n \t\tgit commit --author \"Alice <alice@localhost>\" -m \"a change by alice\" file1 &&\n \t\tgit commit --author \"Bob <bob@localhost>\" -m \"a change by bob\" file2 &&\n \t\tgit config git-p4.skipSubmitEditCheck true &&\n-\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret \"$GITP4\" commit --preserve-user &&\n+\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit --preserve-user &&\n \t\tp4_check_commit_author file1 alice &&\n \t\tp4_check_commit_author file2 bob\n \t)\n@@ -227,21 +227,21 @@ test_expect_success 'preserve users' '\n # Test username support, submitting as bob, who lacks admin rights. Should\n # not submit change to p4 (git diff should show deltas).\n test_expect_success 'refuse to preserve users without perms' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit config git-p4.skipSubmitEditCheck true &&\n \t\techo \"username-noperms: a change by alice\" >>file1 &&\n \t\tgit commit --author \"Alice <alice@localhost>\" -m \"perms: a change by alice\" file1 &&\n-\t\tP4EDITOR=touch P4USER=bob P4PASSWD=secret test_must_fail \"$GITP4\" commit --preserve-user &&\n+\t\tP4EDITOR=touch P4USER=bob P4PASSWD=secret test_must_fail git p4 commit --preserve-user &&\n \t\ttest_must_fail git diff --exit-code HEAD..p4/master\n \t)\n '\n \n # What happens with unknown author? Without allowMissingP4Users it should fail.\n test_expect_success 'preserve user where author is unknown to p4' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -250,24 +250,24 @@ test_expect_success 'preserve user where author is unknown to p4' '\n \t\tgit commit --author \"Bob <bob@localhost>\" -m \"preserve: a change by bob\" file1 &&\n \t\techo \"username-unknown: a change by charlie\" >>file1 &&\n \t\tgit commit --author \"Charlie <charlie@localhost>\" -m \"preserve: a change by charlie\" file1 &&\n-\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret test_must_fail \"$GITP4\" commit --preserve-user &&\n+\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret test_must_fail git p4 commit --preserve-user &&\n \t\ttest_must_fail git diff --exit-code HEAD..p4/master &&\n \n \t\techo \"$0: repeat with allowMissingP4Users enabled\" &&\n \t\tgit config git-p4.allowMissingP4Users true &&\n \t\tgit config git-p4.preserveUser true &&\n-\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret \"$GITP4\" commit &&\n+\t\tP4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit &&\n \t\tgit diff --exit-code HEAD..p4/master &&\n \t\tp4_check_commit_author file1 alice\n \t)\n '\n \n-# If we're *not* using --preserve-user, git-p4 should warn if we're submitting\n+# If we're *not* using --preserve-user, git p4 should warn if we're submitting\n # changes that are not all ours.\n # Test: user in p4 and user unknown to p4.\n # Test: warning disabled and user is the same.\n test_expect_success 'not preserving user with mixed authorship' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -275,20 +275,20 @@ test_expect_success 'not preserving user with mixed authorship' '\n \t\tp4_add_user derek Derek &&\n \n \t\tmake_change_by_user usernamefile3 Derek derek@localhost &&\n-\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret \"$GITP4\" commit |\\\n+\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\\\n \t\tgrep \"git author derek@localhost does not match\" &&\n \n \t\tmake_change_by_user usernamefile3 Charlie charlie@localhost &&\n-\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret \"$GITP4\" commit |\\\n+\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\\\n \t\tgrep \"git author charlie@localhost does not match\" &&\n \n \t\tmake_change_by_user usernamefile3 alice alice@localhost &&\n-\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret \"$GITP4\" |\\\n+\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 |\\\n \t\ttest_must_fail grep \"git author.*does not match\" &&\n \n \t\tgit config git-p4.skipUserNameCheck true &&\n \t\tmake_change_by_user usernamefile3 Charlie charlie@localhost &&\n-\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret \"$GITP4\" commit |\\\n+\t\tP4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\\\n \t\ttest_must_fail grep \"git author.*does not match\" &&\n \n \t\tp4_check_commit_author usernamefile3 alice\n@@ -307,7 +307,7 @@ test_expect_success 'initial import time from top change time' '\n \tp4change=$(p4 -G changes -m 1 //depot/... | marshal_dump change) &&\n \tp4time=$(p4 -G changes -m 1 //depot/... | marshal_dump time) &&\n \tsleep 3 &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -325,7 +325,7 @@ test_expect_success 'initial import time from top change time' '\n # Repeat, this time with a smaller threshold and confirm that the rename is\n # detected in P4.\n test_expect_success 'detect renames' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -334,7 +334,7 @@ test_expect_success 'detect renames' '\n \t\tgit mv file1 file4 &&\n \t\tgit commit -a -m \"Rename file1 to file4\" &&\n \t\tgit diff-tree -r -M HEAD &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file4 &&\n \t\tp4 filelog //depot/file4 | test_must_fail grep -q \"branch from\" &&\n \n@@ -342,7 +342,7 @@ test_expect_success 'detect renames' '\n \t\tgit commit -a -m \"Rename file4 to file5\" &&\n \t\tgit diff-tree -r -M HEAD &&\n \t\tgit config git-p4.detectRenames true &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file5 &&\n \t\tp4 filelog //depot/file5 | grep -q \"branch from //depot/file4\" &&\n \n@@ -354,7 +354,7 @@ test_expect_success 'detect renames' '\n \t\tlevel=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d\" \" -f5 | sed \"s/R0*//\") &&\n \t\ttest -n \"$level\" && test \"$level\" -gt 0 && test \"$level\" -lt 98 &&\n \t\tgit config git-p4.detectRenames $(($level + 2)) &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file6 &&\n \t\tp4 filelog //depot/file6 | test_must_fail grep -q \"branch from\" &&\n \n@@ -366,7 +366,7 @@ test_expect_success 'detect renames' '\n \t\tlevel=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d\" \" -f5 | sed \"s/R0*//\") &&\n \t\ttest -n \"$level\" && test \"$level\" -gt 2 && test \"$level\" -lt 100 &&\n \t\tgit config git-p4.detectRenames $(($level - 2)) &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file7 &&\n \t\tp4 filelog //depot/file7 | grep -q \"branch from //depot/file6\"\n \t)\n@@ -384,7 +384,7 @@ test_expect_success 'detect renames' '\n # Modify and copy a file, configure a smaller threshold in detectCopies and\n # confirm that copy is detected in P4.\n test_expect_success 'detect copies' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -394,7 +394,7 @@ test_expect_success 'detect copies' '\n \t\tgit add file8 &&\n \t\tgit commit -a -m \"Copy file2 to file8\" &&\n \t\tgit diff-tree -r -C HEAD &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file8 &&\n \t\tp4 filelog //depot/file8 | test_must_fail grep -q \"branch from\" &&\n \n@@ -403,7 +403,7 @@ test_expect_success 'detect copies' '\n \t\tgit commit -a -m \"Copy file2 to file9\" &&\n \t\tgit diff-tree -r -C HEAD &&\n \t\tgit config git-p4.detectCopies true &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file9 &&\n \t\tp4 filelog //depot/file9 | test_must_fail grep -q \"branch from\" &&\n \n@@ -412,7 +412,7 @@ test_expect_success 'detect copies' '\n \t\tgit add file2 file10 &&\n \t\tgit commit -a -m \"Modify and copy file2 to file10\" &&\n \t\tgit diff-tree -r -C HEAD &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file10 &&\n \t\tp4 filelog //depot/file10 | grep -q \"branch from //depot/file\" &&\n \n@@ -423,7 +423,7 @@ test_expect_success 'detect copies' '\n \t\tsrc=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&\n \t\ttest \"$src\" = file10 &&\n \t\tgit config git-p4.detectCopiesHarder true &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file11 &&\n \t\tp4 filelog //depot/file11 | grep -q \"branch from //depot/file\" &&\n \n@@ -437,7 +437,7 @@ test_expect_success 'detect copies' '\n \t\tsrc=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&\n \t\ttest \"$src\" = file10 &&\n \t\tgit config git-p4.detectCopies $(($level + 2)) &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file12 &&\n \t\tp4 filelog //depot/file12 | test_must_fail grep -q \"branch from\" &&\n \n@@ -451,7 +451,7 @@ test_expect_success 'detect copies' '\n \t\tsrc=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&\n \t\ttest \"$src\" = file10 &&\n \t\tgit config git-p4.detectCopies $(($level - 2)) &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 filelog //depot/file13 &&\n \t\tp4 filelog //depot/file13 | grep -q \"branch from //depot/file\"\n \t)\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex d414705..2859256 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 p4 branching tests'\n+test_description='git p4 tests for p4 branches'\n \n . ./lib-git-p4.sh\n \n@@ -63,7 +63,7 @@ test_expect_success 'basic p4 branches' '\n \n test_expect_success 'import main, no branch detection' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/main@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/main@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n@@ -74,7 +74,7 @@ test_expect_success 'import main, no branch detection' '\n \n test_expect_success 'import branch1, no branch detection' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/branch1@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/branch1@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n@@ -85,7 +85,7 @@ test_expect_success 'import branch1, no branch detection' '\n \n test_expect_success 'import branch2, no branch detection' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/branch2@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/branch2@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n@@ -96,7 +96,7 @@ test_expect_success 'import branch2, no branch detection' '\n \n test_expect_success 'import depot, no branch detection' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n@@ -107,7 +107,7 @@ test_expect_success 'import depot, no branch detection' '\n \n test_expect_success 'import depot, branch detection' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" --detect-branches //depot@all &&\n+\tgit p4 clone --dest=\"$git\" --detect-branches //depot@all &&\n \t(\n \t\tcd \"$git\" &&\n \n@@ -132,7 +132,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio\n \t(\n \t\tcd \"$git\" &&\n \t\tgit config git-p4.branchList main:branch1 &&\n-\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n+\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \n \t\tgit log --oneline --graph --decorate --all &&\n \n@@ -189,15 +189,15 @@ test_expect_success 'add simple p4 branches' '\n # Configure branches through git-config and clone them.\n # All files are tested to make sure branches were cloned correctly.\n # Finally, make an update to branch1 on P4 side to check if it is imported\n-# correctly by git-p4.\n-test_expect_success 'git-p4 clone simple branches' '\n+# correctly by git p4.\n+test_expect_success 'git p4 clone simple branches' '\n \ttest_when_finished cleanup_git &&\n \ttest_create_repo \"$git\" &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit config git-p4.branchList branch1:branch2 &&\n \t\tgit config --add git-p4.branchList branch1:branch3 &&\n-\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n+\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \t\tgit log --all --graph --decorate --stat &&\n \t\tgit reset --hard p4/depot/branch1 &&\n \t\ttest -f file1 &&\n@@ -221,13 +221,13 @@ test_expect_success 'git-p4 clone simple branches' '\n \t\tp4 submit -d \"update file2 in branch3\" &&\n \t\tcd \"$git\" &&\n \t\tgit reset --hard p4/depot/branch1 &&\n-\t\t\"$GITP4\" rebase &&\n+\t\tgit p4 rebase &&\n \t\tgrep file2_ file2\n \t)\n '\n \n # Create a complex branch structure in P4 depot to check if they are correctly\n-# cloned. The branches are created from older changelists to check if git-p4 is\n+# cloned. The branches are created from older changelists to check if git p4 is\n # able to correctly detect them.\n # The final expected structure is:\n # `branch1\n@@ -248,7 +248,7 @@ test_expect_success 'git-p4 clone simple branches' '\n #   `- file1\n #   `- file2\n #   `- file3\n-test_expect_success 'git-p4 add complex branches' '\n+test_expect_success 'git p4 add complex branches' '\n \ttest_when_finished cleanup_git &&\n \ttest_create_repo \"$git\" &&\n \t(\n@@ -263,10 +263,10 @@ test_expect_success 'git-p4 add complex branches' '\n \t)\n '\n \n-# Configure branches through git-config and clone them. git-p4 will only be able\n+# Configure branches through git-config and clone them. git p4 will only be able\n # to clone the original structure if it is able to detect the origin changelist\n # of each branch.\n-test_expect_success 'git-p4 clone complex branches' '\n+test_expect_success 'git p4 clone complex branches' '\n \ttest_when_finished cleanup_git &&\n \ttest_create_repo \"$git\" &&\n \t(\n@@ -275,7 +275,7 @@ test_expect_success 'git-p4 clone complex branches' '\n \t\tgit config --add git-p4.branchList branch1:branch3 &&\n \t\tgit config --add git-p4.branchList branch1:branch4 &&\n \t\tgit config --add git-p4.branchList branch1:branch5 &&\n-\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n+\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \t\tgit log --all --graph --decorate --stat &&\n \t\tgit reset --hard p4/depot/branch1 &&\n \t\ttest_path_is_file file1 &&\ndiff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh\nindex 992bb8c..21924df 100755\n--- a/t/t9802-git-p4-filetype.sh\n+++ b/t/t9802-git-p4-filetype.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 p4 filetype tests'\n+test_description='git p4 filetype tests'\n \n . ./lib-git-p4.sh\n \n@@ -37,7 +37,7 @@ test_expect_success 'utf-16 file create' '\n \n test_expect_success 'utf-16 file test' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \t(\n \t\tcd \"$git\" &&\n \n@@ -84,7 +84,7 @@ test_expect_success 'keyword file test' '\n \tbuild_smush &&\n \ttest_when_finished rm -f k_smush.py ko_smush.py &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \t(\n \t\tcd \"$git\" &&\n \n@@ -94,7 +94,7 @@ test_expect_success 'keyword file test' '\n \t\t\"$PYTHON_PATH\" \"$TRASH_DIRECTORY/ko_smush.py\" <\"$cli/k-text-ko\" >cli-k-text-ko-smush &&\n \t\ttest_cmp cli-k-text-ko-smush k-text-ko &&\n \n-\t\t# utf16, even though p4 expands keywords, git-p4 does not\n+\t\t# utf16, even though p4 expands keywords, git p4 does not\n \t\t# try to undo that\n \t\ttest_cmp \"$cli/k-utf16-k\" k-utf16-k &&\n \t\ttest_cmp \"$cli/k-utf16-ko\" k-utf16-ko\n@@ -125,7 +125,7 @@ test_expect_success 'ignore apple' '\n \t\tp4 submit -d appledouble\n \t) &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tgit p4 clone --dest=\"$git\" //depot@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest ! -f double.png\ndiff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh\nindex db67020..fbacff3 100755\n--- a/t/t9803-git-p4-shell-metachars.sh\n+++ b/t/t9803-git-p4-shell-metachars.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 transparency to shell metachars in filenames'\n+test_description='git p4 transparency to shell metachars in filenames'\n \n . ./lib-git-p4.sh\n \n@@ -18,7 +18,7 @@ test_expect_success 'init depot' '\n '\n \n test_expect_success 'shell metachars in filenames' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -28,7 +28,7 @@ test_expect_success 'shell metachars in filenames' '\n \t\techo f2 >\"file with spaces\" &&\n \t\tgit add \"file with spaces\" &&\n \t\tgit commit -m \"add files\" &&\n-\t\tP4EDITOR=touch \"$GITP4\" submit\n+\t\tP4EDITOR=touch git p4 submit\n \t) &&\n \t(\n \t\tcd \"$cli\" &&\n@@ -39,7 +39,7 @@ test_expect_success 'shell metachars in filenames' '\n '\n \n test_expect_success 'deleting with shell metachars' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -47,7 +47,7 @@ test_expect_success 'deleting with shell metachars' '\n \t\tgit rm foo\\$bar &&\n \t\tgit rm file\\ with\\ spaces &&\n \t\tgit commit -m \"remove files\" &&\n-\t\tP4EDITOR=touch \"$GITP4\" submit\n+\t\tP4EDITOR=touch git p4 submit\n \t) &&\n \t(\n \t\tcd \"$cli\" &&\n@@ -97,7 +97,7 @@ test_expect_success 'branch with shell char' '\n \t\tcd \"$git\" &&\n \n \t\tgit config git-p4.branchList main:branch\\$3 &&\n-\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n+\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \t\tgit log --all --graph --decorate --stat &&\n \t\tgit reset --hard p4/depot/branch\\$3 &&\n \t\ttest -f shell_char_branch_file &&\ndiff --git a/t/t9804-git-p4-label.sh b/t/t9804-git-p4-label.sh\nindex 80d01ea..c8eec0e 100755\n--- a/t/t9804-git-p4-label.sh\n+++ b/t/t9804-git-p4-label.sh\n@@ -1,4 +1,4 @@\n-test_description='git-p4 p4 label tests'\n+test_description='git p4 label tests'\n \n . ./lib-git-p4.sh\n \n@@ -48,7 +48,7 @@ test_expect_success 'basic p4 labels' '\n \n \t\tp4 labels ... &&\n \n-\t\t\"$GITP4\" clone --dest=\"$git\" --detect-labels //depot@all &&\n+\t\tgit p4 clone --dest=\"$git\" --detect-labels //depot@all &&\n \t\tcd \"$git\" &&\n \n \t\tgit tag &&\n@@ -87,7 +87,7 @@ test_expect_failure 'two labels on the same changelist' '\n \n \t\tp4 labels ... &&\n \n-\t\t\"$GITP4\" clone --dest=\"$git\" --detect-labels //depot@all &&\n+\t\tgit p4 clone --dest=\"$git\" --detect-labels //depot@all &&\n \t\tcd \"$git\" &&\n \n \t\tgit tag | grep tag_f1 &&\ndiff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh\nindex df929e0..4a72f79 100755\n--- a/t/t9805-git-p4-skip-submit-edit.sh\n+++ b/t/t9805-git-p4-skip-submit-edit.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 skipSubmitEdit config variables'\n+test_description='git p4 skipSubmitEdit config variables'\n \n . ./lib-git-p4.sh\n \n@@ -19,33 +19,33 @@ test_expect_success 'init depot' '\n \n # this works because EDITOR is set to :\n test_expect_success 'no config, unedited, say yes' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\techo line >>file1 &&\n \t\tgit commit -a -m \"change 2\" &&\n-\t\techo y | \"$GITP4\" submit &&\n+\t\techo y | git p4 submit &&\n \t\tp4 changes //depot/... >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n \n test_expect_success 'no config, unedited, say no' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\techo line >>file1 &&\n \t\tgit commit -a -m \"change 3 (not really)\" &&\n-\t\tprintf \"bad response\\nn\\n\" | \"$GITP4\" submit &&\n+\t\tprintf \"bad response\\nn\\n\" | git p4 submit &&\n \t\tp4 changes //depot/... >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n \n test_expect_success 'skipSubmitEdit' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -54,21 +54,21 @@ test_expect_success 'skipSubmitEdit' '\n \t\tgit config core.editor /bin/false &&\n \t\techo line >>file1 &&\n \t\tgit commit -a -m \"change 3\" &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 changes //depot/... >wc &&\n \t\ttest_line_count = 3 wc\n \t)\n '\n \n test_expect_success 'skipSubmitEditCheck' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit config git-p4.skipSubmitEditCheck true &&\n \t\techo line >>file1 &&\n \t\tgit commit -a -m \"change 4\" &&\n-\t\t\"$GITP4\" submit &&\n+\t\tgit p4 submit &&\n \t\tp4 changes //depot/... >wc &&\n \t\ttest_line_count = 4 wc\n \t)\n@@ -76,7 +76,7 @@ test_expect_success 'skipSubmitEditCheck' '\n \n # check the normal case, where the template really is edited\n test_expect_success 'no config, edited' '\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \ted=\"$TRASH_DIRECTORY/ed.sh\" &&\n \ttest_when_finished \"rm \\\"$ed\\\"\" &&\n@@ -91,7 +91,7 @@ test_expect_success 'no config, edited' '\n \t\tcd \"$git\" &&\n \t\techo line >>file1 &&\n \t\tgit commit -a -m \"change 5\" &&\n-\t\tEDITOR=\"\\\"$ed\\\"\" \"$GITP4\" submit &&\n+\t\tEDITOR=\"\\\"$ed\\\"\" git p4 submit &&\n \t\tp4 changes //depot/... >wc &&\n \t\ttest_line_count = 5 wc\n \t)\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex 0571602..2892367 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 options'\n+test_description='git p4 options'\n \n . ./lib-git-p4.sh\n \n@@ -24,11 +24,11 @@ test_expect_success 'init depot' '\n '\n \n test_expect_success 'clone no --git-dir' '\n-\ttest_must_fail \"$GITP4\" clone --git-dir=xx //depot\n+\ttest_must_fail git p4 clone --git-dir=xx //depot\n '\n \n test_expect_success 'clone --branch' '\n-\t\"$GITP4\" clone --branch=refs/remotes/p4/sb --dest=\"$git\" //depot &&\n+\tgit p4 clone --branch=refs/remotes/p4/sb --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -42,7 +42,7 @@ test_expect_success 'clone --changesfile' '\n \tcf=\"$TRASH_DIRECTORY/cf\" &&\n \ttest_when_finished \"rm \\\"$cf\\\"\" &&\n \tprintf \"1\\n3\\n\" >\"$cf\" &&\n-\t\"$GITP4\" clone --changesfile=\"$cf\" --dest=\"$git\" //depot &&\n+\tgit p4 clone --changesfile=\"$cf\" --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -58,14 +58,14 @@ test_expect_success 'clone --changesfile, @all' '\n \tcf=\"$TRASH_DIRECTORY/cf\" &&\n \ttest_when_finished \"rm \\\"$cf\\\"\" &&\n \tprintf \"1\\n3\\n\" >\"$cf\" &&\n-\ttest_must_fail \"$GITP4\" clone --changesfile=\"$cf\" --dest=\"$git\" //depot@all\n+\ttest_must_fail git p4 clone --changesfile=\"$cf\" --dest=\"$git\" //depot@all\n '\n \n # imports both master and p4/master in refs/heads\n # requires --import-local on sync to find p4 refs/heads\n # does not update master on sync, just p4/master\n test_expect_success 'clone/sync --import-local' '\n-\t\"$GITP4\" clone --import-local --dest=\"$git\" //depot@1,2 &&\n+\tgit p4 clone --import-local --dest=\"$git\" //depot@1,2 &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -73,9 +73,9 @@ test_expect_success 'clone/sync --import-local' '\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 2 lines &&\n-\t\ttest_must_fail \"$GITP4\" sync &&\n+\t\ttest_must_fail git p4 sync &&\n \n-\t\t\"$GITP4\" sync --import-local &&\n+\t\tgit p4 sync --import-local &&\n \t\tgit log --oneline refs/heads/master >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n@@ -84,7 +84,7 @@ test_expect_success 'clone/sync --import-local' '\n '\n \n test_expect_success 'clone --max-changes' '\n-\t\"$GITP4\" clone --dest=\"$git\" --max-changes 2 //depot@all &&\n+\tgit p4 clone --dest=\"$git\" --max-changes 2 //depot@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -101,7 +101,7 @@ test_expect_success 'clone --keep-path' '\n \t\tp4 add sub/dir/f4 &&\n \t\tp4 submit -d \"change 4\"\n \t) &&\n-\t\"$GITP4\" clone --dest=\"$git\" --keep-path //depot/sub/dir@all &&\n+\tgit p4 clone --dest=\"$git\" --keep-path //depot/sub/dir@all &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n@@ -109,7 +109,7 @@ test_expect_success 'clone --keep-path' '\n \t\ttest_path_is_file sub/dir/f4\n \t) &&\n \tcleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot/sub/dir@all &&\n+\tgit p4 clone --dest=\"$git\" //depot/sub/dir@all &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_path_is_file f4 &&\n@@ -126,7 +126,7 @@ test_expect_success 'clone --use-client-spec' '\n \t(\n \t\t# big usage message\n \t\texec >/dev/null &&\n-\t\ttest_must_fail \"$GITP4\" clone --dest=\"$git\" --use-client-spec\n+\t\ttest_must_fail git p4 clone --dest=\"$git\" --use-client-spec\n \t) &&\n \tcli2=\"$TRASH_DIRECTORY/cli2\" &&\n \tmkdir -p \"$cli2\" &&\n@@ -142,7 +142,7 @@ test_expect_success 'clone --use-client-spec' '\n \t) &&\n \tP4CLIENT=client2 &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" --use-client-spec //depot/... &&\n+\tgit p4 clone --dest=\"$git\" --use-client-spec //depot/... &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_path_is_file bus/dir/f4 &&\n@@ -156,7 +156,7 @@ test_expect_success 'clone --use-client-spec' '\n \t\tcd \"$git\" &&\n \t\tgit init &&\n \t\tgit config git-p4.useClientSpec true &&\n-\t\t\"$GITP4\" sync //depot/... &&\n+\t\tgit p4 sync //depot/... &&\n \t\tgit checkout -b master p4/master &&\n \t\ttest_path_is_file bus/dir/f4 &&\n \t\ttest_path_is_missing file1\ndiff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh\nindex b1f61e3..1541716 100755\n--- a/t/t9807-git-p4-submit.sh\n+++ b/t/t9807-git-p4-submit.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 submit'\n+test_description='git p4 submit'\n \n . ./lib-git-p4.sh\n \n@@ -19,7 +19,7 @@ test_expect_success 'init depot' '\n \n test_expect_success 'submit with no client dir' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \t(\n \t\tcd \"$git\" &&\n \t\techo file2 >file2 &&\n@@ -27,20 +27,20 @@ test_expect_success 'submit with no client dir' '\n \t\tgit commit -m \"git commit 2\" &&\n \t\trm -rf \"$cli\" &&\n \t\tgit config git-p4.skipSubmitEdit true &&\n-\t\t\"$GITP4\" submit\n+\t\tgit p4 submit\n \t)\n '\n \n # make two commits, but tell it to apply only from HEAD^\n test_expect_success 'submit --origin' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_commit \"file3\" &&\n \t\ttest_commit \"file4\" &&\n \t\tgit config git-p4.skipSubmitEdit true &&\n-\t\t\"$GITP4\" submit --origin=HEAD^\n+\t\tgit p4 submit --origin=HEAD^\n \t) &&\n \t(\n \t\tcd \"$cli\" &&\n@@ -52,30 +52,30 @@ test_expect_success 'submit --origin' '\n \n test_expect_success 'submit with allowSubmit' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_commit \"file5\" &&\n \t\tgit config git-p4.skipSubmitEdit true &&\n \t\tgit config git-p4.allowSubmit \"nobranch\" &&\n-\t\ttest_must_fail \"$GITP4\" submit &&\n+\t\ttest_must_fail git p4 submit &&\n \t\tgit config git-p4.allowSubmit \"nobranch,master\" &&\n-\t\t\"$GITP4\" submit\n+\t\tgit p4 submit\n \t)\n '\n \n test_expect_success 'submit with master branch name from argv' '\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tgit p4 clone --dest=\"$git\" //depot &&\n \t(\n \t\tcd \"$git\" &&\n \t\ttest_commit \"file6\" &&\n \t\tgit config git-p4.skipSubmitEdit true &&\n-\t\ttest_must_fail \"$GITP4\" submit nobranch &&\n+\t\ttest_must_fail git p4 submit nobranch &&\n \t\tgit branch otherbranch &&\n \t\tgit reset --hard HEAD^ &&\n \t\ttest_commit \"file7\" &&\n-\t\t\"$GITP4\" submit otherbranch\n+\t\tgit p4 submit otherbranch\n \t) &&\n \t(\n \t\tcd \"$cli\" &&\ndiff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh\nindex eb8cc95..73c0902 100755\n--- a/t/t9808-git-p4-chdir.sh\n+++ b/t/t9808-git-p4-chdir.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 relative chdir'\n+test_description='git p4 relative chdir'\n \n . ./lib-git-p4.sh\n \n@@ -26,7 +26,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '\n \t(\n \t\tP4CONFIG=p4config && export P4CONFIG &&\n \t\tunset P4PORT P4CLIENT &&\n-\t\t\"$GITP4\" clone --verbose --dest=\"$git\" //depot\n+\t\tgit p4 clone --verbose --dest=\"$git\" //depot\n \t)\n '\n \n@@ -38,7 +38,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '\n \t(\n \t\tP4CONFIG=p4config && export P4CONFIG &&\n \t\tunset P4PORT P4CLIENT &&\n-\t\t\"$GITP4\" clone --verbose --dest=\"git\" //depot\n+\t\tgit p4 clone --verbose --dest=\"git\" //depot\n \t)\n '\n \ndiff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh\nindex ae9145e..d86bffd 100755\n--- a/t/t9809-git-p4-client-view.sh\n+++ b/t/t9809-git-p4-client-view.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='git-p4 client view'\n+test_description='git p4 client view'\n \n . ./lib-git-p4.sh\n \n@@ -92,25 +92,25 @@ test_expect_success 'init depot' '\n test_expect_success 'unsupported view wildcard %%n' '\n \tclient_view \"//depot/%%%%1/sub/... //client/sub/%%%%1/...\" &&\n \ttest_when_finished cleanup_git &&\n-\ttest_must_fail \"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot\n+\ttest_must_fail git p4 clone --use-client-spec --dest=\"$git\" //depot\n '\n \n test_expect_success 'unsupported view wildcard *' '\n \tclient_view \"//depot/*/bar/... //client/*/bar/...\" &&\n \ttest_when_finished cleanup_git &&\n-\ttest_must_fail \"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot\n+\ttest_must_fail git p4 clone --use-client-spec --dest=\"$git\" //depot\n '\n \n test_expect_success 'wildcard ... only supported at end of spec 1' '\n \tclient_view \"//depot/.../file11 //client/.../file11\" &&\n \ttest_when_finished cleanup_git &&\n-\ttest_must_fail \"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot\n+\ttest_must_fail git p4 clone --use-client-spec --dest=\"$git\" //depot\n '\n \n test_expect_success 'wildcard ... only supported at end of spec 2' '\n \tclient_view \"//depot/.../a/... //client/.../a/...\" &&\n \ttest_when_finished cleanup_git &&\n-\ttest_must_fail \"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot\n+\ttest_must_fail git p4 clone --use-client-spec --dest=\"$git\" //depot\n '\n \n test_expect_success 'basic map' '\n@@ -118,7 +118,7 @@ test_expect_success 'basic map' '\n \tfiles=\"cli1/file11 cli1/file12\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -126,7 +126,7 @@ test_expect_success 'client view with no mappings' '\n \tclient_view &&\n \tclient_verify &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify\n '\n \n@@ -135,7 +135,7 @@ test_expect_success 'single file map' '\n \tfiles=\"file11\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -146,7 +146,7 @@ test_expect_success 'later mapping takes precedence (entire repo)' '\n \t       cli2/dir2/file21 cli2/dir2/file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -156,7 +156,7 @@ test_expect_success 'later mapping takes precedence (partial repo)' '\n \tfiles=\"file21 file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -172,7 +172,7 @@ test_expect_success 'depot path matching rejected client path' '\n \tfiles=\"cli12/file21 cli12/file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -183,7 +183,7 @@ test_expect_success 'exclusion wildcard, client rhs same (odd)' '\n \t\t    \"-//depot/dir2/... //client/...\" &&\n \tclient_verify &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify\n '\n \n@@ -193,7 +193,7 @@ test_expect_success 'exclusion wildcard, client rhs different (normal)' '\n \tfiles=\"dir1/file11 dir1/file12\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -203,7 +203,7 @@ test_expect_success 'exclusion single file' '\n \tfiles=\"dir1/file11 dir1/file12 dir2/file21\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -213,7 +213,7 @@ test_expect_success 'overlay wildcard' '\n \tfiles=\"cli/file11 cli/file12 cli/file21 cli/file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -223,7 +223,7 @@ test_expect_success 'overlay single file' '\n \tfiles=\"cli/file11 cli/file12 cli/file21\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -234,7 +234,7 @@ test_expect_success 'exclusion with later inclusion' '\n \tfiles=\"dir1/file11 dir1/file12 dir2incl/file21 dir2incl/file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -242,7 +242,7 @@ test_expect_success 'quotes on rhs only' '\n \tclient_view \"//depot/dir1/... \\\"//client/cdir 1/...\\\"\" &&\n \tclient_verify \"cdir 1/file11\" \"cdir 1/file12\" &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify \"cdir 1/file11\" \"cdir 1/file12\"\n '\n \n@@ -282,7 +282,7 @@ test_expect_success 'overlay collision 1 to 2' '\n \tclient_verify $files &&\n \ttest_cmp actual \"$cli\"/filecollide &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files &&\n \ttest_cmp actual \"$git\"/filecollide\n '\n@@ -295,7 +295,7 @@ test_expect_failure 'overlay collision 2 to 1' '\n \tclient_verify $files &&\n \ttest_cmp actual \"$cli\"/filecollide &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files &&\n \ttest_cmp actual \"$git\"/filecollide\n '\n@@ -317,7 +317,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted' '\n \tfiles=\"file11 file12 file21 file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -340,7 +340,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted, then 1 updated' '\n \tfiles=\"file11 file12 file21 file22\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files\n '\n \n@@ -396,7 +396,7 @@ test_expect_success 'overlay sync: initial git checkout' '\n \techo dir1/colA >actual &&\n \tclient_verify $files &&\n \ttest_cmp actual \"$cli\"/colA &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files &&\n \ttest_cmp actual \"$git\"/colA\n '\n@@ -421,7 +421,7 @@ test_expect_success 'overlay sync: colA content switch' '\n \ttest_cmp actual \"$cli\"/colA &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files &&\n@@ -448,7 +448,7 @@ test_expect_success 'overlay sync: colB appears' '\n \ttest_cmp actual \"$cli\"/colB &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files &&\n@@ -476,7 +476,7 @@ test_expect_success 'overlay sync: colB disappears' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files\n@@ -534,7 +534,7 @@ test_expect_success 'overlay sync swap: initial git checkout' '\n \techo dir1/colA >actual &&\n \tclient_verify $files &&\n \ttest_cmp actual \"$cli\"/colA &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify $files &&\n \ttest_cmp actual \"$git\"/colA\n '\n@@ -559,7 +559,7 @@ test_expect_failure 'overlay sync swap: colA no content switch' '\n \ttest_cmp actual \"$cli\"/colA &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files &&\n@@ -586,7 +586,7 @@ test_expect_success 'overlay sync swap: colB appears' '\n \ttest_cmp actual \"$cli\"/colB &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files &&\n@@ -616,7 +616,7 @@ test_expect_failure 'overlay sync swap: colB no change' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\t\"$GITP4\" sync --use-client-spec &&\n+\t\tgit p4 sync --use-client-spec &&\n \t\tgit merge --ff-only p4/master\n \t) &&\n \tgit_verify $files &&\n@@ -664,7 +664,7 @@ test_expect_success 'quotes on lhs only' '\n \tfiles=\"cdir1/file11 cdir1/file12\" &&\n \tclient_verify $files &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tclient_verify $files\n '\n \n@@ -672,7 +672,7 @@ test_expect_success 'quotes on both sides' '\n \tclient_view \"\\\"//depot/dir 1/...\\\" \\\"//client/cdir 1/...\\\"\" &&\n \tclient_verify \"cdir 1/file11\" \"cdir 1/file12\" &&\n \ttest_when_finished cleanup_git &&\n-\t\"$GITP4\" clone --use-client-spec --dest=\"$git\" //depot &&\n+\tgit p4 clone --use-client-spec --dest=\"$git\" //depot &&\n \tgit_verify \"cdir 1/file11\" \"cdir 1/file12\"\n '\n \n-- \n1.7.9.192.ga1d4b\n"},{"id":"184528","messageId":"4F380ADB.4090304@diamand.org","threadId":"29610","inReplyTo":"1329070423-23761-1-git-send-email-pw@padd.com","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-02-12T18:54:19Z","receivedAt":"2012-02-12T18:54:19Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 12/02/12 18:13, Pete Wyckoff wrote:\n> The git-p4 code is in a single python script down in\n> contrib/fast-import now.  I'd like to move it up to the top-level\n> source directory of git to make it easier to build and\n> distribute.  Git-p4 already takes advantage of the git\n> infrastructure for documentation and testing, as well as the\n> community support (Junio, many reviewers).\n\nAbout time this was done. There's still a few oddities around but far \nfewer than there used to be. I don't know if Junio has some rules on \nwhat a command needs before it graduates from contrib though.\n\n<snip>\n\n> a core git package, or as a separate add-on.  Getting support\n> for python and git-p4 in msysgit is something I'd like to see\n> happen too.\n\nNot sure about msysgit, but last time I tried on Windows it didn't work \nat all well.\n\n>\n> While I considered taking this opportunity to split up git-p4\n> into more modular components across multiple files, it seems best\n> now just to do the script move intact.  That effort could come\n> later.  If anyone has a strong preference to do this now, we could.\n\nRegards!\nLuke\n"},{"id":"184547","messageId":"7vwr7rgsuw.fsf@alter.siamese.dyndns.org","threadId":"29610","inReplyTo":"4F380ADB.4090304@diamand.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-13T06:17:11Z","receivedAt":"2012-02-13T06:17:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n> On 12/02/12 18:13, Pete Wyckoff wrote:\n>> The git-p4 code is in a single python script down in\n>> contrib/fast-import now.  I'd like to move it up to the top-level\n>> source directory of git to make it easier to build and\n>> distribute.  Git-p4 already takes advantage of the git\n>> infrastructure for documentation and testing, as well as the\n>> community support (Junio, many reviewers).\n>\n> About time this was done. There's still a few oddities around but far\n> fewer than there used to be. I don't know if Junio has some rules on\n> what a command needs before it graduates from contrib though.\n\nI try not to play a dictator around here. The primary thing I hesitated so\nfar about git-p4 is that it is useless if you live in the open source only\nworld, iow without proprietary software.\n"},{"id":"184593","messageId":"7vehtyec64.fsf@alter.siamese.dyndns.org","threadId":"29610","inReplyTo":"1329070423-23761-1-git-send-email-pw@padd.com","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-13T20:00:35Z","receivedAt":"2012-02-13T20:00:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pete Wyckoff <pw@padd.com> writes:\n\n> Users install git-p4 currently by copying the git-p4 script from\n> contrib/fast-import into a local or personal bin directory, and\n> setting up an alias for \"git p4\" to invoke it.\n\nErm,... do you really need the alias if you add git-p4 in a directory on\nyour $PATH?\n"},{"id":"184602","messageId":"20120213203709.GA31671@ecki","threadId":"29610","inReplyTo":"7vehtyec64.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Clemens Buchacher","fromEmail":"drizzd@aon.at","sentAt":"2012-02-13T20:37:10Z","receivedAt":"2012-02-13T20:37:10Z","isPatch":true,"sender":{"key":"drizzd@gmx.net","avatar":"https://avatars.githubusercontent.com/u/59082?v=4"},"body":"On Mon, Feb 13, 2012 at 12:00:35PM -0800, Junio C Hamano wrote:\n> Pete Wyckoff <pw@padd.com> writes:\n> \n> > Users install git-p4 currently by copying the git-p4 script from\n> > contrib/fast-import into a local or personal bin directory, and\n> > setting up an alias for \"git p4\" to invoke it.\n> \n> Erm,... do you really need the alias if you add git-p4 in a directory on\n> your $PATH?\n\nWith recent git versions, this has stopped working. I was told it is a\nfeature that git only looks in exec-path now. Maybe I should not have\nbelieved that?\n\nClemens\n"},{"id":"184609","messageId":"7vhayuctwm.fsf@alter.siamese.dyndns.org","threadId":"29610","inReplyTo":"20120213203709.GA31671@ecki","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-13T21:20:25Z","receivedAt":"2012-02-13T21:20:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Clemens Buchacher <drizzd@aon.at> writes:\n\n>> Erm,... do you really need the alias if you add git-p4 in a directory on\n>> your $PATH?\n>\n> With recent git versions, this has stopped working.\n\nErm, I am confused.\n\n\t$ git --exec-path\n\t/home/junio/g/Debian-6.X-x86_64/git-jch/libexec/git-core\n\t$ type git-hello\n\tbash: type: git-hello: not found\n\t$ cat >~/bin/common/git-hello <<EOF\n\t#!/bin/sh\n\techo hello world\n\tEOF\n\t$ chmod +x ~/bin/common/git-hello\n\t$ type git-hello\n\tgit-hello is /home/junio/bin/common/git-hello\n\t$ git hello\n\thello world\n\nWhat am I missing???\n"},{"id":"184624","messageId":"20120213233245.GA29582@padd.com","threadId":"29610","inReplyTo":"7vhayuctwm.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-13T23:32:45Z","receivedAt":"2012-02-13T23:32:45Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"gitster@pobox.com wrote on Mon, 13 Feb 2012 13:20 -0800:\n> Clemens Buchacher <drizzd@aon.at> writes:\n> \n> >> Erm,... do you really need the alias if you add git-p4 in a directory on\n> >> your $PATH?\n> >\n> > With recent git versions, this has stopped working.\n> \n> Erm, I am confused.\n> \n> \t$ git --exec-path\n> \t/home/junio/g/Debian-6.X-x86_64/git-jch/libexec/git-core\n> \t$ type git-hello\n> \tbash: type: git-hello: not found\n> \t$ cat >~/bin/common/git-hello <<EOF\n> \t#!/bin/sh\n> \techo hello world\n> \tEOF\n> \t$ chmod +x ~/bin/common/git-hello\n> \t$ type git-hello\n> \tgit-hello is /home/junio/bin/common/git-hello\n> \t$ git hello\n> \thello world\n> \n> What am I missing???\n\nNeat.  I never knew this worked.  That lets me remove quite a\nfew aliases.  Apparently this has been possible since the\nconversion from git.sh to git.c.\n\nI tried to find where in the documentation this is talked about,\nor where it should go.  This doesn't feel like the best spot,\nthough.\n\n------------8<-----------\n\n>From 574669898aa891ffe3e785b280ac36177116658e Mon Sep 17 00:00:00 2001\nFrom: Pete Wyckoff <pw@padd.com>\nDate: Mon, 13 Feb 2012 18:17:10 -0500\nSubject: [PATCH] document git-<command> can be found in PATH\n\nExplain up front to users that arbitrary git \"commands\" can\nbe found anywhere in the PATH.  For example, ~/bin/git-hello\nwill be invoked by \"git hello\".\n---\n Documentation/git.txt |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex f7e201f..0ef7f40 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -30,6 +30,8 @@ introduction.\n \n The '<command>' is either a name of a Git command (see below) or an alias\n as defined in the configuration file (see linkgit:git-config[1]).\n+A '<command>' can also refer to an executable with the name git-'<command>'\n+anywhere in your PATH.\n \n Formatted and hyperlinked version of the latest git\n documentation can be viewed at\n-- \n1.7.9.193.g1d4a5.dirty\n"},{"id":"184625","messageId":"20120213233706.GB29582@padd.com","threadId":"29610","inReplyTo":"7vwr7rgsuw.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-02-13T23:37:06Z","receivedAt":"2012-02-13T23:37:06Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"gitster@pobox.com wrote on Sun, 12 Feb 2012 22:17 -0800:\n> Luke Diamand <luke@diamand.org> writes:\n> \n> > On 12/02/12 18:13, Pete Wyckoff wrote:\n> >> The git-p4 code is in a single python script down in\n> >> contrib/fast-import now.  I'd like to move it up to the top-level\n> >> source directory of git to make it easier to build and\n> >> distribute.  Git-p4 already takes advantage of the git\n> >> infrastructure for documentation and testing, as well as the\n> >> community support (Junio, many reviewers).\n> >\n> > About time this was done. There's still a few oddities around but far\n> > fewer than there used to be. I don't know if Junio has some rules on\n> > what a command needs before it graduates from contrib though.\n> \n> I try not to play a dictator around here. The primary thing I hesitated so\n> far about git-p4 is that it is useless if you live in the open source only\n> world, iow without proprietary software.\n\nYes, sad.  Git-p4 at least helps people who have no choice but to\nuse p4, e.g., when working in a corporate environment.\n\nIt's been a big help developing git-p4 inside the git source tree\nalready.  Having git-p4 be an installed component would make it\neasier on users.  \"make install\" puts the script where it goes.\nOr better, they get it through their OS distribution.\n\n\t\t-- Pete\n"},{"id":"184647","messageId":"20120214092048.GC1762@ecki","threadId":"29610","inReplyTo":"7vhayuctwm.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Clemens Buchacher","fromEmail":"drizzd@aon.at","sentAt":"2012-02-14T09:20:48Z","receivedAt":"2012-02-14T09:20:48Z","isPatch":true,"sender":{"key":"drizzd@gmx.net","avatar":"https://avatars.githubusercontent.com/u/59082?v=4"},"body":"On Mon, Feb 13, 2012 at 01:20:25PM -0800, Junio C Hamano wrote:\n> Clemens Buchacher <drizzd@aon.at> writes:\n> \n> >> Erm,... do you really need the alias if you add git-p4 in a directory on\n> >> your $PATH?\n> >\n> > With recent git versions, this has stopped working.\n> \n> Erm, I am confused.\n\nLooks like in my case it did not work because I had a PATH entry with a\n'~' in it. It probably stopped working for me because I moved some\nexecutables around.\n\nIt's not a regression (I just tried with 1.6.0 and I get the same\nresult).  And dash does not apply tilde expansion to PATH either.  So\nmaybe it's not even a bug.\n"},{"id":"184667","messageId":"7vaa4l8diz.fsf@alter.siamese.dyndns.org","threadId":"29610","inReplyTo":"20120214092048.GC1762@ecki","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-14T18:40:04Z","receivedAt":"2012-02-14T18:40:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Clemens Buchacher <drizzd@aon.at> writes:\n\n> On Mon, Feb 13, 2012 at 01:20:25PM -0800, Junio C Hamano wrote:\n>> Clemens Buchacher <drizzd@aon.at> writes:\n>> \n>> >> Erm,... do you really need the alias if you add git-p4 in a directory on\n>> >> your $PATH?\n>> >\n>> > With recent git versions, this has stopped working.\n>> \n>> Erm, I am confused.\n>\n> Looks like in my case it did not work because I had a PATH entry with a\n> '~' in it. It probably stopped working for me because I moved some\n> executables around.\n>\n> It's not a regression (I just tried with 1.6.0 and I get the same\n> result).  And dash does not apply tilde expansion to PATH either.\n\nI do not think tilde in $PATH is expanded by exec*p family to begin with,\nso it is not \"dash\" but POSIX, I would think.  It is bash that is harming\nother programs, by trying to be more helpful, encouraging this user\nmistake to add ~ literally on the PATH.\n\nYou can see it in action below.\n\n$ cd /var/tmp\n$ cat >execlptest.c <<\\EOF\n#include <unistd.h>\n#include <errno.h>\n#include <string.h>\n#include <stdio.h>\n\nint main(int ac, const char **av)\n{\n\tint status = execlp(\"xyzzy\", \"xyzzy\", NULL);\n\tprintf(\"execlp returned %d (errno = %d, %s)\\n\",\n\t       status, errno, strerror(errno));\n\treturn 0;\n}\nEOF\n$ gcc -o execlptest execlptest.c\n$ cat >/home/junio/junk/xyzzy <<\\EOF\n#!/bin/sh\nexec lp test\nEOF\n$ chmod +x /home/junio/junk/xyzzy\n$ PATH=/usr/bin:/bin\n$ export PATH\n$ /var/tmp/execlptest \nexeclp returned -1 (errno = 2, No such file or directory)\n: notice the sq pair around the value on the next line\n$ PATH='/usr/bin:/bin:~/junk'; export PATH; echo \"$PATH\"\n/usr/bin:/bin:~/junk\n$ /var/tmp/execlptest \nexeclp returned -1 (errno = 2, No such file or directory)\n$ xyzzy\nexec lp test\n$ echo $BASH_VERSION\n4.1.5(1)-release\n"},{"id":"184669","messageId":"20120214190515.GB12072@sigill.intra.peff.net","threadId":"29610","inReplyTo":"7vaa4l8diz.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-02-14T19:05:15Z","receivedAt":"2012-02-14T19:05:15Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 14, 2012 at 10:40:04AM -0800, Junio C Hamano wrote:\n\n> I do not think tilde in $PATH is expanded by exec*p family to begin with,\n> so it is not \"dash\" but POSIX, I would think.  It is bash that is harming\n> other programs, by trying to be more helpful, encouraging this user\n> mistake to add ~ literally on the PATH.\n\nHmm. There is an interesting ramification for run-command's \"use_shell\"\noptimization. Typically, git runs all of the user-provided commands\ngiven to it via the shell. But if the command contains no\nmeta-characters, we skip the shell invocation as an optimization, since\nthe shell should simply be word-splitting and calling exec, and the\nbehavior will be identical.\n\nBut if your shell handles PATH entries differently, then there is a\ndifference. I.e., doing this:\n\n  mkdir junk\n  ln -s /usr/bin/vi junk/my-editor\n  export PATH=~/junk:$PATH\n  export GIT_EDITOR=my-editor\n  git commit\n\nmight work without the optimization, but not with.\n\nWe could check PATH and disable the optimization in that case, but I\nsuspect it is not worth it, as:\n\n  1. People who put a literal \"~\" in their PATH get what they deserve\n     anyway. :)\n\n  2. We explicitly run \"sh\" in such situations, not SHELL_PATH. Even if\n     \"sh\" is bash, I believe it should look at its own argv[0] and put\n     itself into a more POSIX-y mode (but I didn't test).\n\n-Peff\n"},{"id":"184672","messageId":"7vpqdh6wve.fsf@alter.siamese.dyndns.org","threadId":"29610","inReplyTo":"20120214190515.GB12072@sigill.intra.peff.net","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-14T19:25:09Z","receivedAt":"2012-02-14T19:25:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Tue, Feb 14, 2012 at 10:40:04AM -0800, Junio C Hamano wrote:\n>\n>> I do not think tilde in $PATH is expanded by exec*p family to begin with,\n>> so it is not \"dash\" but POSIX, I would think.  It is bash that is harming\n>> other programs, by trying to be more helpful, encouraging this user\n>> mistake to add ~ literally on the PATH.\n>\n> Hmm. There is an interesting ramification for run-command's \"use_shell\"\n> optimization....\n> But if your shell handles PATH entries differently, then there is a\n> difference.\n\nYeah, I agree; that is exactly what I meant by bash harming users by\ntrying to be more helpful.\n"},{"id":"184677","messageId":"20120214194910.GA5297@ecki","threadId":"29610","inReplyTo":"20120214190515.GB12072@sigill.intra.peff.net","subject":"Re: [RFC PATCH 0/3] git-p4: move to toplevel","fromName":"Clemens Buchacher","fromEmail":"drizzd@aon.at","sentAt":"2012-02-14T19:49:10Z","receivedAt":"2012-02-14T19:49:10Z","isPatch":true,"sender":{"key":"drizzd@gmx.net","avatar":"https://avatars.githubusercontent.com/u/59082?v=4"},"body":"On Tue, Feb 14, 2012 at 02:05:15PM -0500, Jeff King wrote:\n>\n>   2. We explicitly run \"sh\" in such situations, not SHELL_PATH. Even if\n>      \"sh\" is bash, I believe it should look at its own argv[0] and put\n>      itself into a more POSIX-y mode (but I didn't test).\n\nIndeed it does.\n"}]}