Re: [RFC PATCH] remote: add --fetch option to git remote set-url

2018-10-30 Thread Junio C Hamano
Denton Liu writes: > On Mon, Oct 29, 2018 at 02:57:28PM +0900, Junio C Hamano wrote: > ... >> Earlier you had a check like this: >> >> > + if (push_mode && fetch_mode) >> > + die(_("--push --fetch doesn't make sense")); >> >> If a request to "--fetch" is ignored when "--add" is

Re: [RFC PATCH] remote: add --fetch option to git remote set-url

2018-10-30 Thread Denton Liu
On Mon, Oct 29, 2018 at 02:57:28PM +0900, Junio C Hamano wrote: > Denton Liu writes: > > > This adds the --fetch option to `git remote set-url` such that when > > executed we move the remote.*.url to remote.*.pushurl and set > > remote.*.url to the given url argument. > > > > I suspect this is

Re: [RFC PATCH] remote: add --fetch option to git remote set-url

2018-10-28 Thread Junio C Hamano
Denton Liu writes: > This adds the --fetch option to `git remote set-url` such that when > executed we move the remote.*.url to remote.*.pushurl and set > remote.*.url to the given url argument. > I suspect this is a horrible idea from end-user's point of view. "set-url --push" is used to SET

[RFC PATCH] remote: add --fetch option to git remote set-url

2018-10-27 Thread Denton Liu
This adds the --fetch option to `git remote set-url` such that when executed we move the remote.*.url to remote.*.pushurl and set remote.*.url to the given url argument. For example, if we have the following config: [remote "origin"] url = g...@github.com:git/git.git