aboutsummaryrefslogtreecommitdiff
path: root/t/t9805-git-p4-skip-submit-edit.sh
Commit message (Collapse)AuthorAge
* git-p4: fix handling of multi-word P4EDITORLuke Diamand2015-05-24
| | | | | | | | | | | | | | This teaches git-p4 to pass the P4EDITOR variable to the shell for expansion, so that any command-line arguments are correctly handled. Without this, git-p4 can only launch the editor if P4EDITOR is solely the path to the binary, without any arguments. This also adjusts t9805, which relied on the previous behaviour. Suggested-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: do not pollute /tmpPete Wyckoff2014-01-22
| | | | | | | | | | | | | | | | | | | | | | Generating the submit template for p4 uses tempfile.mkstemp(), which by default puts files in /tmp. For a test that fails, possibly on purpose, this is not cleaned up. Run with TMPDIR pointing into the trash directory so the temp files go away with the test results. To do this required some other minor changes. First, the editor is launched using system(editor + " " + template_file), using shell expansion to build the command string. This doesn't work if editor has a space in it. And is generally unwise as it's easy to fool the shell into doing extra work. Exec the args directly, without shell expansion. Second, without shell expansion, the trick of "P4EDITOR=:" used in the tests doesn't work. Use a real command, true, as the non-interactive editor for testing. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: standardize submit cancel due to unchanged templatePete Wyckoff2012-09-16
| | | | | | | | | | | | | | | | | | | | When editing the submit template, if no change was made to it, git p4 offers a prompt "Submit anyway?". Answering "no" cancels the submit. Previously, a "no" answer behaves like a "[s]kip" answer to the failed-patch prompt, in that it proceeded to try to apply the rest of the commits. Instead, put users back into the new "[s]kip / [c]ontinue" loop so that they can decide. This makes both cases of patch failure behave identically. The return code of git p4 after a "no" answer is now the same as that for a "skip" due to failed patch; update a test to understand this. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: simplify quoting involving TRASH_DIRECTORYPete Wyckoff2012-06-27
| | | | | | | | | For temporary files that are created in the top-level TRASH_DIRECTORY, trust that the tests do not chdir except in subshells, and avoid some quoting. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: fix unit testsLuke Diamand2012-04-25
| | | | | | | | The submit-edit tests relied on P4EDITOR being unset. Set it explicitly to an empty string. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: use "git p4" directly in testsPete Wyckoff2012-04-09
| | | | | | | | | | | | Drop the $GITP4 variable that was used to specify the script in contrib/fast-import/. The command is called "git p4" now, not "git-p4". Note that configuration variables will remain in a section called "git-p4". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rename git-p4 testsPete Wyckoff2011-12-27
Use consistent naming for all tests: "t98<num>-git-p4-<topic>.sh" Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>