Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-06-02 Thread Jeff King
On Sat, Jun 02, 2018 at 06:46:31AM +0200, Duy Nguyen wrote: > > if (used_deprecated_reflog_option) { > > - warning("the '-l' alias for '--create-reflog' is > > deprecated;"); > > - warning("it will be removed in a future version of Git"); > > +

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-06-01 Thread Duy Nguyen
On Fri, May 25, 2018 at 4:40 AM, Jeff King wrote: > -- >8 -- > Subject: [PATCH] branch: customize "-l" warning in list mode > > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in that command does (and the "-l"

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-31 Thread Junio C Hamano
Jeff King writes: > So I think you're proposing: > > - step 0: warn about "-l" when it actually gets used, and otherwise > continue ignoring > > - step 1: turn "-l" into "--list" > > - step 2: there is no step 2 > > ... So I > guess the right rule is to warn when we are not in

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Kaartic.Sivaraam
On Wednesday 30 May 2018 08:22 AM, Junio C Hamano wrote: Jeff King writes: Right, what I meant by "gentler" is that we continue to perform the same behavior as the old version, alongside the warning. It's arguable here because running "git branch -l" has _always_ been wrong. It's just wrong

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Jeff King
On Wed, May 30, 2018 at 11:52:19AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Right, what I meant by "gentler" is that we continue to perform the same > > behavior as the old version, alongside the warning. It's arguable here > > because running "git branch -l" has _always_ been

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Jeff King
On Wed, May 30, 2018 at 11:48:32AM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> - if (list) { > >> - warning("the '-l' option is an alias for > >> '--create-reflog' and"); > >> - warning("has no effect in list mode. This option will > >>

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Junio C Hamano
Jeff King writes: > Right, what I meant by "gentler" is that we continue to perform the same > behavior as the old version, alongside the warning. It's arguable here > because running "git branch -l" has _always_ been wrong. It's just wrong > in a way that happens to do what the user wants. ;) >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Junio C Hamano
Jeff King writes: >> -if (list) { >> -warning("the '-l' option is an alias for >> '--create-reflog' and"); >> -warning("has no effect in list mode. This option will >> soon be"); >> -warning("removed and you should omit it

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
On Tue, May 29, 2018 at 05:20:29PM -0400, Jeff King wrote: > Thanks. There's one bit missing here, because it did not cause a textual > conflict during the rebase (but it's now dead code). Patch below (to be > squashed to the tip of jk/branch-l-1-removal). > [...] > - if

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
On Sat, May 26, 2018 at 11:32:35AM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > Yup, thanks for being extra explicit. I do imagine there are quite > > a few of us who would be puzzled without this update (but with the > > previous one to unhide it from behind the pager). > >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
On Sun, May 27, 2018 at 12:15:40AM +0530, Kaartic Sivaraam wrote: > > Hmm, actually, I suppose the true value of the warning is to help people > > doing "git branch -l foo", and it would still work there. The "more > > extreme" from your suggested patch would only affect "branch -l". > > > >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-26 Thread Kaartic Sivaraam
On Friday 25 May 2018 08:10 AM, Jeff King wrote: > Subject: [PATCH] branch: customize "-l" warning in list mode > > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in that command does (and the "-l" becomes a >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-26 Thread Kaartic Sivaraam
On Friday 25 May 2018 01:01 AM, Jeff King wrote: > On Thu, May 24, 2018 at 03:22:14PM -0400, Jeff King wrote: > > Hmm, actually, I suppose the true value of the warning is to help people > doing "git branch -l foo", and it would still work there. The "more > extreme" from your suggested patch

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Jeff King writes: >> By the way, this is one of these times when I feel that we should >> have a better multi-line message support in die/error/warning/info >> functions. Ideally, I should be able to write >> >> warning(_("the '-l' option is an alias for '--create-reflog'

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: > With these two patches queued on top of jk/branch-l-0-deprecation, > the follow-up patches jk/branch-l-1-removal that makes 'branch -l' > to fail and then jk/branch-l-2-reincarnation that makes 'branch -l' > a synonym to 'branch --list' needs rebasing.

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: > Yup, thanks for being extra explicit. I do imagine there are quite > a few of us who would be puzzled without this update (but with the > previous one to unhide it from behind the pager). With these two patches queued on top of

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Jeff King
On Fri, May 25, 2018 at 06:14:16PM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > >> - warning("the '-l' alias for '--create-reflog' is deprecated;"); > >> - warning("it will be removed in a future version of Git"); > >> + if (list) { >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: >> -warning("the '-l' alias for '--create-reflog' is deprecated;"); >> -warning("it will be removed in a future version of Git"); >> +if (list) { >> +warning("the '-l' option is an alias for >>

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Jeff King writes: > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in that command does (and the "-l" becomes a > silent noop). > > Since afc968e579 (branch: deprecate "-l" option, 2018-03-26) >

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Jeff King
On Fri, May 25, 2018 at 10:55:45AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Hmm, actually, I suppose the true value of the warning is to help people > > doing "git branch -l foo", and it would still work there. The "more > > extreme" from your suggested patch would

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Junio C Hamano
Jeff King writes: > Hmm, actually, I suppose the true value of the warning is to help people > doing "git branch -l foo", and it would still work there. The "more > extreme" from your suggested patch would only affect "branch -l". > Still, I think I prefer the gentler version

[PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Jeff King
tler version that we get by keeping it as a warning even in the latter case. Here's the patch. It goes on top of jk/branch-l-0-deprecation (and will naturally conflict with the removal branch, but the resolution should be obvious). -- >8 -- Subject: [PATCH] branch: issue "-l" deprec