Thread (2 messages) 2 messages, 2 authors, 2016-12-13

Re: [PATCH 2/2] tmp-objdir: quote paths we add to alternates

From: Junio C Hamano <hidden>
Date: 2016-12-13 18:10:16

Jeff King [off-list ref] writes:
The naive conversion is just:
...
-# MINGW does not allow colons in pathnames in the first place
-test_expect_success !MINGW 'push to repo path with colon' '
+if test_have_prereq MINGW
+then
+	path_sep=';'
+else
+	path_sep=':'
+fi
...
-	git clone --bare . xxx:yyy.git &&
+	git clone --bare . xxx${path_sep}yyy.git &&
Don't you want to dq the whole thing to prevent the shell from
splitting this into two commands at ';'?  The other one below is OK.
 
 	echo change >>file.bin &&
 	git commit -am change &&
 	# Note that we have to use the full path here, or it gets confused
 	# with the ssh host:path syntax.
-	git push "$PWD/xxx:yyy.git" HEAD
+	git push "$PWD/xxx${path_sep}yyy.git" HEAD
 '
 
 test_done

Does that work?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help