@matheusbsbs / matheus-bagliano / commits / 8b7d4e738e
Fork 0

"remote prune": be quiet when there is nothing to prune

The previous commit made it always say "Pruning $remote" but reported the URL only when there is something to prune. Make it consistent by not saying anything at all when there is nothing to prune. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jun 11, 2008 at 23:43 UTC 8b7d4e738ee5489fecb5c4a55d14884b09e0dc6d
1 file changed +3 -2
builtin-remote.c
+3 -2
@@ -560,12 +560,13 @@ static int prune(int argc, const char **argv)
560
561 get_remote_ref_states(*argv, &states, 1);
562
563 - printf("Pruning %s\n", *argv);
564 - if (states.stale.nr)
563 + if (states.stale.nr) {
564 + printf("Pruning %s\n", *argv);
565 printf("URL: %s\n",
566 states.remote->url_nr
567 ? states.remote->url[0]
568 : "(no URL)");
569 + }
570
571 for (i = 0; i < states.stale.nr; i++) {
572 const char *refname = states.stale.items[i].util;