Re: [PATCH v2] remote show: fix the -n option
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 9, 2008, 16:35 UTC
- Message-ID
- <alpine.DEB.1.00.0806091733230.1783@racer>
- In-Reply-To
- <484D5322.6050309@free.fr>
Hi,
On Mon, 9 Jun 2008, Olivier Marin wrote:
Show 10 quoted lines
> diff --git a/builtin-remote.c b/builtin-remote.c
> index c49f00f..efe74c7 100644
> --- a/builtin-remote.c
> +++ b/builtin-remote.c
> @@ -421,10 +421,10 @@ static void show_list(const char *title, struct path_list *list)
>
> static int show_or_prune(int argc, const char **argv, int prune)
> {
> - int dry_run = 0, result = 0;
> + int no_query = 0, result = 0;Just for the record (not that I think anybody will care): I do not like this change.
Show 20 quoted lines
> @@ -442,21 +442,23 @@ static int show_or_prune(int argc, const char **argv, int prune)
> struct transport *transport;
> const struct ref *ref;
> struct strbuf buf;
> - int i, got_states;
> + int i;
>
> states.remote = remote_get(*argv);
> if (!states.remote)
> return error("No such remote: %s", *argv);
> - transport = transport_get(NULL, states.remote->url_nr > 0 ?
> - states.remote->url[0] : NULL);
> - ref = transport_get_remote_refs(transport);
> - transport_disconnect(transport);
>
> read_branches();
> - got_states = get_ref_states(ref, &states);
> - if (got_states)
> - result = error("Error getting local info for '%s'",
> - states.remote->name);And I do not like this change either. It proliferates the "we just die() and do not care about reusing the code where die()ing is not desired" paradigm.
Sad, Dscho