Skip to contentSkip to conversation

bisect: fix singular/plural grammar nit

PATCH In review David Ripton 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bisect: fix singular/plural grammar nit

Remove the trailing 's' from "revisions" and "steps" when there is only one.

---
 bisect.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
bisect.c +5 -3
index f1a1f84..af280b4 100644
@@ -956,7 +956,7 @@ int bisect_next_all(const char *prefix)
 {
 	struct rev_info revs;
 	struct commit_list *tried;
-	int reaches = 0, all = 0, nr;
+	int reaches = 0, all = 0, nr, steps;
 	const unsigned char *bisect_rev;
 	char bisect_rev_hex[41];
 
@@ -998,8 +998,10 @@ int bisect_next_all(const char *prefix)
 	}
 
 	nr = all - reaches - 1;
-	printf("Bisecting: %d revisions left to test after this "
-	       "(roughly %d steps)\n", nr, estimate_bisect_steps(all));
+	steps = estimate_bisect_steps(all);
+	printf("Bisecting: %d revision%s left to test after this "
+	       "(roughly %d step%s)\n", nr, (nr == 1 ? "" : "s"),
+               steps, (steps == 1 ? "" : "s"));
 
 	return bisect_checkout(bisect_rev_hex);
 }
Signature · 1 line
David Ripton    [email protected]
#1 lore raw
Quoted 2 lines · David Ripton

Remove the trailing 's' from "revisions" and "steps" when there is only one.

Thanks; will apply to 'maint'.