Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-09-12 Thread Kaartic Sivaraam
On Tue, 2017-09-12 at 15:49 +0900, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > > Thanks. Now I get it. What about doing that check in > > branch.c::create_branch or branch.c::validate_new_branchname? I guess > > creating a branch named HEAD isn't that good an idea in any case. Doing > >

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-09-11 Thread Junio C Hamano
Kaartic Sivaraam writes: > On Wed, 2017-08-16 at 12:09 -0700, Junio C Hamano wrote: >> You said that "checkout" does not do a necessary check that is done >> in "branch", so presumably "branch" already has a code to do so that >> is not called by the current "checkout", right? Then you would add

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-16 Thread Kaartic Sivaraam
On Wed, 2017-08-16 at 12:09 -0700, Junio C Hamano wrote: > You said that "checkout" does not do a necessary check that is done > in "branch", so presumably "branch" already has a code to do so that > is not called by the current "checkout", right? Then you would add > a new caller in "checkout" to

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-16 Thread Junio C Hamano
Kaartic Sivaraam writes: > On Wednesday 16 August 2017 12:28 AM, Junio C Hamano wrote: >> Some refactoring to make it easier to reuse it from the new caller >> would be necessary. > Sorry but I think I don't get that correctly. What's the "new caller" > being referred to here? > What should be r

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-16 Thread Kaartic Sivaraam
On Wednesday 16 August 2017 12:28 AM, Junio C Hamano wrote: Some refactoring to make it easier to reuse it from the new caller would be necessary. Sorry but I think I don't get that correctly. What's the "new caller" being referred to here? What should be refactored? --- Kaartic

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-15 Thread Junio C Hamano
Kaartic Sivaraam writes: > 1. Duplicate the check done in 'builtin/branch.c' in > 'builtin/checkout.c'. This doesn't > sound good to me. Doesn't sound good to me, either. Some refactoring to make it easier to reuse it from the new caller would be necessary.

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-15 Thread Kaartic Sivaraam
On Tuesday 15 August 2017 01:49 AM, Junio C Hamano wrote: I wonder if these two lines add any value here. Those who know the reason would not be helped, and those who don't know have to view "git show b347d06bf" anyway. That's right. I somehow think the above wastes bits a bit too much. Woul

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-15 Thread Kaartic Sivaraam
On Tuesday 15 August 2017 12:44 AM, Martin Ågren wrote: --set-upstream:: - If specified branch does not exist yet or if `--force` has been - given, acts exactly like `--track`. Otherwise sets up configuration - like `--track` would when creating the branch, except that where -

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-14 Thread Junio C Hamano
Kaartic Sivaraam writes: > The '--set-upstream' option of branch was deprecated in, > > b347d06bf branch: deprecate --set-upstream and show help if we > detect possible mistaken use (Thu, 30 Aug 2012 19:23:13 +0200) > > It was deprecated for the reasons specified in the commit message of

Re: [PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-14 Thread Martin Ågren
On 14 August 2017 at 10:54, Kaartic Sivaraam wrote: > The '--set-upstream' option of branch was deprecated in, > > b347d06bf branch: deprecate --set-upstream and show help if we > detect possible mistaken use (Thu, 30 Aug 2012 19:23:13 +0200) > > It was deprecated for the reasons specified

[PATCH v3 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-14 Thread Kaartic Sivaraam
The '--set-upstream' option of branch was deprecated in, b347d06bf branch: deprecate --set-upstream and show help if we detect possible mistaken use (Thu, 30 Aug 2012 19:23:13 +0200) It was deprecated for the reasons specified in the commit message of the referenced commit. Make 'branch'