git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: complete --move for git branch

From
Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Date
Jun 7, 2016, 09:16 UTC
Message-ID
<1120818262.376555.1465290963431.JavaMail.zimbra@ensimag.grenoble-inp.fr>
In-Reply-To
<CABr9L5AK5KhFvAW4dah3Hji_VStgYKesnD+Ljari7ihJX8Y7fg@mail.gmail.com>
Ville Skyttä <ville.skytta@iki.fi> writes:
Show 19 quoted lines
> On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso
> <remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:
> >
> > Hi,
> >
> > Ville Skyttä <ville.skytta@iki.fi> writes:
> > >          while [ $c -lt $cword ]; do
> > >                  i="${words[c]}"
> > >                  case "$i" in
> > > -                -d|-m)        only_local_ref="y" ;;
> > > -                -r)        has_r="y" ;;
> > > +                -d|-m|--move)        only_local_ref="y" ;;
> >
> > "While you're at it" you might want to do the same thing for
> > `--delete`.
> 
> I'm afraid the "while I'm at it" would never end if I start looking
> deeper into missing things there, so I'd prefer this self contained
> one I keep running into myself applied first.

I understand, though adding `--delete` here makes sense since there is already the short-hand `-d` that is tested (like you added `--move` since the short-hand `-m` is tested). However adding it here means that we should also add it in completion list below. Thinking about it, it might be better to have it in a separate patch, so no further objections with this patch.

Show 8 quoted lines
> 
> > > +                -r)                has_r="y" ;;
> >
> > You are introducing an additional tab here that you probably didn't
> > want.
> 
> It was intentionally added it to keep "only_local_ref" and "has_r"
> tab-aligned the way they already were.
Ah indeed, my bad, I didn't see it.

Thanks, Rémi

Previous: Ville SkyttäNext: Ville Skyttä
Message 4 of 6 in “completion: complete --move for git branch”
  1. completion: complete --move for git branchVille Skyttä, Jun 6, 2016
  2. Remi Galan AlfonsoJun 6, 2016
  3. Ville SkyttäJun 6, 2016
  4. Remi Galan AlfonsoJun 7, 2016
  5. completion: complete --delete, --move, and --remotes for git branchVille Skyttä, Aug 9, 2016
  6. Junio C HamanoAug 9, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.