]> git.ipfire.org Git - thirdparty/git.git/commit
git p4 test: avoid loop in client_view
authorPete Wyckoff <pw@padd.com>
Sun, 27 Jan 2013 03:11:08 +0000 (22:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Jan 2013 06:00:38 +0000 (22:00 -0800)
commit6112541b444b52d5ac83f491eabefbf571da4997
treeb18fb5488f0545a92c91c30f0e40104b72905470
parentdaa38f4ae0afdc6357c547d2f6bd5270e1e4151a
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>
t/lib-git-p4.sh
t/t9809-git-p4-client-view.sh