X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-remote.c;h=ac69d37c8af415a64cba88a888e9b80db95ef97a;hb=8851f4800c15fe91b6a53e9e284787b983226c41;hp=db18bcfc97f0739c2e77164dc0222148a44c67a6;hpb=df4364a42981dec067dbacfd6371d4ca910df48e;p=git.git diff --git a/builtin-remote.c b/builtin-remote.c index db18bcfc9..ac69d37c8 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -756,12 +756,17 @@ static int prune(int argc, const char **argv) OPT_END() }; struct ref_states states; + const char *dangling_msg; argc = parse_options(argc, argv, options, builtin_remote_usage, 0); if (argc < 1) usage_with_options(builtin_remote_usage, options); + dangling_msg = (dry_run + ? " %s will become dangling!\n" + : " %s has become dangling!\n"); + memset(&states, 0, sizeof(states)); for (; argc; argc--, argv++) { int i; @@ -784,6 +789,7 @@ static int prune(int argc, const char **argv) printf(" * [%s] %s\n", dry_run ? "would prune" : "pruned", abbrev_ref(refname, "refs/remotes/")); + warn_dangling_symref(dangling_msg, refname); } /* NEEDSWORK: free remote */