Re: [PATCH 2/2] git-p4: fix handling of multi-word P4EDITOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luke Diamand <luke@xxxxxxxxxxx> writes:

> On 07/05/15 21:16, Junio C Hamano wrote:
>> Luke Diamand <luke@xxxxxxxxxxx> writes:
>>
>>> On Linux:
>>>
>>> $ export P4EDITOR="gvim -f"
>>> $ p4 submit
>>> -- works as you would hope --
>>>
>>> $ export P4EDITOR="/home/lgd/My Programs/editor.sh"
>>> $ p4 submit
>>> sh: 1: /home/lgd/My: not found
>>>
>>> $ export P4EDITOR="/home/lgd/My\ Programs/editor.sh"
>>> -- works fine --
>>
>> Good.  That is exactly I wanted to see.
>
> Test case t9805-git-p4-skip-submit-edit.sh fails with that change. It
> sets P4EDITOR to "$TRASH_DIRECTORY/ed.sh".

;-)

Perhaps something like this would work (totally untested)?

diff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh
index 8931188..a47b44b 100755
--- a/t/t9805-git-p4-skip-submit-edit.sh
+++ b/t/t9805-git-p4-skip-submit-edit.sh
@@ -90,8 +90,9 @@ test_expect_success 'no config, edited' '
 		cd "$git" &&
 		echo line >>file1 &&
 		git commit -a -m "change 5" &&
-		P4EDITOR="$TRASH_DIRECTORY/ed.sh" &&
-		export P4EDITOR &&
+		customEditor="$TRASH_DIRECTORY/ed.sh" &&
+		P4EDITOR="\$customEditor" &&
+		export customEditor P4EDITOR &&
 		git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 5 wc
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]