Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Jacob Keller
On Mon, Mar 26, 2018 at 12:44 AM, Eric Sunshine wrote: > On Mon, Mar 26, 2018 at 3:25 AM, Jeff King wrote: >> OK, so here's some patches. We could do the first three now, wait a >> while before the fourth, and then wait a while (or never) on the fifth. >>

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Eric Sunshine
On Mon, Mar 26, 2018 at 3:25 AM, Jeff King wrote: > OK, so here's some patches. We could do the first three now, wait a > while before the fourth, and then wait a while (or never) on the fifth. > > [1/5]: t3200: unset core.logallrefupdates when testing reflog creation > [2/5]:

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Jeff King
On Sun, Mar 25, 2018 at 12:15:42AM -0700, Jacob Keller wrote: > > 3. Drop "-l" (probably with a deprecation period); it seems unlikely > > to me that anybody uses it for branch creation, and this would at > > least reduce the confusion (then it would just be "so why don't we > >

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Junio C Hamano
Jeff King writes: > IMHO we should do one of: > > 1. Nothing. ;) > > 2. Complain about "-l" in list mode to help educate users about the > current craziness. Nah. We've seen this, perhaps not often but enough times over long period of time. The above two would not fly

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Kaartic Sivaraam
On Sunday 25 March 2018 11:18 AM, Eric Sunshine wrote: > On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: >> On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: >>> Can we have a couple new tests: one checking "git branch --list" for >>> the typical case (when rebasing off a

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Jacob Keller
On Sat, Mar 24, 2018 at 9:33 PM, Jeff King wrote: > IMHO we should do one of: > > 1. Nothing. ;) > > 2. Complain about "-l" in list mode to help educate users about the > current craziness. > I think we should do this at a minimum. It's easy, and it doesn't break any

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Kaartic Sivaraam
On Sunday 25 March 2018 10:03 AM, Jeff King wrote: > ... > but I'd prefer to avoid those kinds of magic rules if we can. They're > very hard to explain to the user, and can be quite baffling when they go > wrong. > I fell the same too. > IMHO we should do one of: > > 1. Nothing. ;) > > 2.

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: > On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: > > Can we have a couple new tests: one checking "git branch --list" for > > the typical case (when rebasing off a named branch) and one checking > > when rebasing from a

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Jeff King
On Sun, Mar 25, 2018 at 12:28:30AM -0400, Eric Sunshine wrote: > On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > > Alternatively, we could at least detect the situation that confused you: > > > > diff --git a/builtin/branch.c b/builtin/branch.c > > @@ -676,6 +676,9 @@ int

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > Alternatively, we could at least detect the situation that confused you: > > diff --git a/builtin/branch.c b/builtin/branch.c > @@ -676,6 +676,9 @@ int cmd_branch(int argc, const char **argv, const char > *prefix) > + if

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > So: > > git branch -l > > _looks_ like it works, but only because list mode is the default. If you > did: > > git branch -l foo > > you would find that it does list "foo" at all, but instead creates a new > branch "foo" with

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Jeff King
On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: > >> When rebasing interacitvely (rebase -i), "git branch -l" prints a line > > > > The "git branch -l" threw me since "-l" is short for --create-reflog. > > I'm guessing you meant "git branch --list". > > That's surprising, I

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Kaartic Sivaraam
On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: > On Sat, Mar 24, 2018 at 2:38 PM, Kaartic Sivaraam > wrote: >> When rebasing interacitvely (rebase -i), "git branch -l" prints a line > > The "git branch -l" threw me since "-l" is short for --create-reflog. >

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sat, Mar 24, 2018 at 2:38 PM, Kaartic Sivaraam wrote: > When rebasing interacitvely (rebase -i), "git branch -l" prints a line The "git branch -l" threw me since "-l" is short for --create-reflog. I'm guessing you meant "git branch --list". > indicating the

[PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Kaartic Sivaraam
When rebasing interacitvely (rebase -i), "git branch -l" prints a line indicating the current branch being rebased. This works well when the interactive rebase was intiated when a local branch is checked out. This doesn't play well when the rebase was initiated on a remote branch or an arbitrary