[PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-04-02 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string

[PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-28 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: --- a/builtin/push.c +++ b/builtin/push.c @@ -322,7 +322,7 @@ static int push_with_options(struct transport *transport, int flags) static int do_push(const char *repo, int flags) { int i, errs; -struct remote

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-23 Thread Ramkumar Ramachandra
Jonathan Nieder wrote: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: - struct remote *remote = remote_get(repo); + struct remote *remote = pushremote_get(repo); struct remote has url and pushurl fields. What do they mean in the context of these two accessors? /me

[PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: This patch has no visible impact, but serves to enable future patches to introduce configuration variables to set pushremote_name. For example, you can now do the following in handle_config(): if (!strcmp(key, remote.pushdefault))

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: --- a/builtin/push.c +++ b/builtin/push.c @@ -322,7 +322,7 @@ static int push_with_options(struct transport *transport, int flags) static int do_push(const char *repo, int flags) { int i, errs; -struct remote *remote =

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: - struct remote *remote = remote_get(repo); + struct remote *remote = pushremote_get(repo); struct remote has url and pushurl fields. What do they mean in the context of these two accessors? /me is confused. Is the

[PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-20 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-20 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-20 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: if (name) name_given = 1; else { - name = default_remote_name; - name_given = explicit_default_remote_name; + if (pushremote_name) { + name = pushremote_name;

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-20 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Ramkumar Ramachandra artag...@gmail.com writes: if (name) name_given = 1; else { - name = default_remote_name; - name_given = explicit_default_remote_name; + if (pushremote_name) { +

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-20 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: ... There is no implicit fallback (like origin): it just falls back to the .remote codepath, if not explicitly specified. That one sentence is enough to explain the apparent asymmetry, which bothered me. -- To unsubscribe from this list: send