git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t7422: remove extraneous argument to printf
@ 2025-04-03 14:48 Subhaditya Nath
  2025-04-03 17:05 ` Eric Sunshine
  0 siblings, 1 reply; 10+ messages in thread
From: Subhaditya Nath @ 2025-04-03 14:48 UTC (permalink / raw)
  To: git; +Cc: Subhaditya Nath, Junio C Hamano, Patrick Steinhardt

The POSIX man page of printf(1) mentions -
> If the format operand contains no conversion specifications and
> argument operands are present, the results are unspecified.

In practice, this means some printf implementations throw an error
when provided with extra operands, thereby causing the test to fail
erroneously. This commit fixes that issue.

Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
---
 t/t7422-submodule-output.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t7422-submodule-output.sh b/t/t7422-submodule-output.sh
index 023a5cbdc4..1f291a1d49 100755
--- a/t/t7422-submodule-output.sh
+++ b/t/t7422-submodule-output.sh
@@ -180,7 +180,7 @@ test_expect_success !MINGW 'git submodule status --recursive propagates SIGPIPE'
 		COMMIT=$(git rev-parse HEAD) &&
 		for i in $(test_seq 2000)
 		do
-			printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n" "$i" ||
+			printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n" ||
 			return 1
 		done >gitmodules &&
 		BLOB=$(git hash-object -w --stdin <gitmodules) &&
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-04-10 12:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 14:48 [PATCH] t7422: remove extraneous argument to printf Subhaditya Nath
2025-04-03 17:05 ` Eric Sunshine
2025-04-09 16:19   ` Junio C Hamano
2025-04-09 16:29   ` Subhaditya Nath
2025-04-09 16:32     ` Subhaditya Nath
2025-04-09 17:00     ` Eric Sunshine
2025-04-09 18:06       ` Junio C Hamano
2025-04-09 19:11         ` [PATCH] t7422: fix extra printf argument, eliminate loops Subhaditya Nath
2025-04-09 19:11           ` Subhaditya Nath
2025-04-10 12:39             ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).