diff options
author | Pete Wyckoff <pw@padd.com> | 2013-01-27 04:11:08 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-27 07:00:38 +0100 |
commit | 6112541b444b52d5ac83f491eabefbf571da4997 (patch) | |
tree | b18fb5488f0545a92c91c30f0e40104b72905470 /t/lib-git-p4.sh | |
parent | git p4 test: use client_view to build the initial client (diff) | |
download | git-6112541b444b52d5ac83f491eabefbf571da4997.tar.xz git-6112541b444b52d5ac83f491eabefbf571da4997.zip |
git p4 test: avoid loop in client_view
The printf command re-interprets the format string as
long as there are arguments to consume. Use this to
simplify a for loop in the client_view() library function.
This requires a fix to one of the client_view callers.
An errant \n in the string was converted into a harmless
newline in the input to "p4 client -i", but now shows up
as a literal \n as passed through by "%s". Remove the \n.
Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-git-p4.sh')
-rw-r--r-- | t/lib-git-p4.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 890ee60708..b1dbded3e8 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -121,8 +121,6 @@ client_view() { Root: $cli View: EOF - for arg ; do - printf "\t$arg\n" - done + printf "\t%s\n" "$@" ) | p4 client -i } |