Thread (184 messages) 184 messages, 6 authors, 2021-04-01

Re: [RFC/PATCH 5/5] test-tool: split up test-tool read-cache

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-17 13:33:43
Subsystem: the rest · Maintainer: Linus Torvalds

On Wed, Mar 17 2021, Ævar Arnfjörð Bjarmason wrote:
+	if (argc != 2)
+		die("usage: test-tool read-cache-again <count> <file>");
+
+	cnt = strtol(argv[0], NULL, 0);
+	name = argv[2];
This is needed on top, the perils of sending out ad-hoc RFC patches from
the working tree..:
diff --git a/t/helper/test-read-cache-again.c b/t/helper/test-read-cache-again.c
index 5e20ca1c8f..aa97b3aaf3 100644
--- a/t/helper/test-read-cache-again.c
+++ b/t/helper/test-read-cache-again.c
@@ -7,10 +7,9 @@ int cmd__read_cache_again(int argc, const char **argv)
 	int cnt;
 	const char *name;
 
-	if (argc != 2)
+	if (argc != 3)
 		die("usage: test-tool read-cache-again <count> <file>");
-
-	cnt = strtol(argv[0], NULL, 0);
+	cnt = strtol(argv[1], NULL, 0);
 	name = argv[2];
 
 	setup_git_directory();
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help