{"thread":{"id":"42538","subject":"[PATCH] completion: complete --move for git branch","startedAt":"2016-06-06T13:16:11Z","lastAt":"2016-08-09T18:30:15Z","messageCount":6,"participants":["Ville Skyttä","Remi Galan Alfonso","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"288425","messageId":"1465218971-14118-1-git-send-email-ville.skytta@iki.fi","threadId":"42538","inReplyTo":null,"subject":"[PATCH] completion: complete --move for git branch","fromName":"Ville Skyttä","fromEmail":"ville.skytta@iki.fi","sentAt":"2016-06-06T13:16:11Z","receivedAt":"2016-06-06T13:16:11Z","isPatch":true,"sender":{"key":"ville.skytta@iki.fi","avatar":"https://avatars.githubusercontent.com/u/109152?v=4"},"body":"Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>\n---\n contrib/completion/git-completion.bash | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 3402475..6918cc8 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -964,8 +964,8 @@ _git_branch ()\n \twhile [ $c -lt $cword ]; do\n \t\ti=\"${words[c]}\"\n \t\tcase \"$i\" in\n-\t\t-d|-m)\tonly_local_ref=\"y\" ;;\n-\t\t-r)\thas_r=\"y\" ;;\n+\t\t-d|-m|--move)\tonly_local_ref=\"y\" ;;\n+\t\t-r)\t\thas_r=\"y\" ;;\n \t\tesac\n \t\t((c++))\n \tdone\n@@ -979,7 +979,7 @@ _git_branch ()\n \t\t\t--color --no-color --verbose --abbrev= --no-abbrev\n \t\t\t--track --no-track --contains --merged --no-merged\n \t\t\t--set-upstream-to= --edit-description --list\n-\t\t\t--unset-upstream\n+\t\t\t--unset-upstream --move\n \t\t\t\"\n \t\t;;\n \t*)\n-- \n2.5.5\n"},{"id":"288432","messageId":"582640631.360243.1465222588996.JavaMail.zimbra@ensimag.grenoble-inp.fr","threadId":"42538","inReplyTo":"1465218971-14118-1-git-send-email-ville.skytta@iki.fi","subject":"Re: [PATCH] completion: complete --move for git branch","fromName":"Remi Galan Alfonso","fromEmail":"remi.galan-alfonso@ensimag.grenoble-inp.fr","sentAt":"2016-06-06T14:16:29Z","receivedAt":"2016-06-06T14:16:29Z","isPatch":true,"sender":{"key":"remi.galan-alfonso@ensimag.grenoble-inp.fr","avatar":"https://avatars.githubusercontent.com/u/12509162?v=4"},"body":"Hi,\n\nVille Skyttä <ville.skytta@iki.fi> writes:\n>          while [ $c -lt $cword ]; do\n>                  i=\"${words[c]}\"\n>                  case \"$i\" in\n> -                -d|-m)        only_local_ref=\"y\" ;;\n> -                -r)        has_r=\"y\" ;;\n> +                -d|-m|--move)        only_local_ref=\"y\" ;;\n\n\"While you're at it\" you might want to do the same thing for\n`--delete`.\n\n> +                -r)                has_r=\"y\" ;;\n\nYou are introducing an additional tab here that you probably didn't\nwant.\n\n>                  esac\n>                  ((c++))\n>          done\n> @@ -979,7 +979,7 @@ _git_branch ()\n>                          --color --no-color --verbose --abbrev= --no-abbrev\n>                          --track --no-track --contains --merged --no-merged\n>                          --set-upstream-to= --edit-description --list\n> -                        --unset-upstream\n> +                        --unset-upstream --move\n>                          \"\n>                  ;;\n>          *)\n\nThanks,\nRémi\n"},{"id":"288448","messageId":"CABr9L5AK5KhFvAW4dah3Hji_VStgYKesnD+Ljari7ihJX8Y7fg@mail.gmail.com","threadId":"42538","inReplyTo":"582640631.360243.1465222588996.JavaMail.zimbra@ensimag.grenoble-inp.fr","subject":"Re: [PATCH] completion: complete --move for git branch","fromName":"Ville Skyttä","fromEmail":"ville.skytta@iki.fi","sentAt":"2016-06-06T16:19:00Z","receivedAt":"2016-06-06T16:19:00Z","isPatch":true,"sender":{"key":"ville.skytta@iki.fi","avatar":"https://avatars.githubusercontent.com/u/109152?v=4"},"body":"On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso\n<remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:\n>\n> Hi,\n>\n> Ville Skyttä <ville.skytta@iki.fi> writes:\n> >          while [ $c -lt $cword ]; do\n> >                  i=\"${words[c]}\"\n> >                  case \"$i\" in\n> > -                -d|-m)        only_local_ref=\"y\" ;;\n> > -                -r)        has_r=\"y\" ;;\n> > +                -d|-m|--move)        only_local_ref=\"y\" ;;\n>\n> \"While you're at it\" you might want to do the same thing for\n> `--delete`.\n\nI'm afraid the \"while I'm at it\" would never end if I start looking\ndeeper into missing things there, so I'd prefer this self contained\none I keep running into myself applied first.\n\n> > +                -r)                has_r=\"y\" ;;\n>\n> You are introducing an additional tab here that you probably didn't\n> want.\n\nIt was intentionally added it to keep \"only_local_ref\" and \"has_r\"\ntab-aligned the way they already were.\n"},{"id":"288540","messageId":"1120818262.376555.1465290963431.JavaMail.zimbra@ensimag.grenoble-inp.fr","threadId":"42538","inReplyTo":"CABr9L5AK5KhFvAW4dah3Hji_VStgYKesnD+Ljari7ihJX8Y7fg@mail.gmail.com","subject":"Re: [PATCH] completion: complete --move for git branch","fromName":"Remi Galan Alfonso","fromEmail":"remi.galan-alfonso@ensimag.grenoble-inp.fr","sentAt":"2016-06-07T09:16:03Z","receivedAt":"2016-06-07T09:16:03Z","isPatch":true,"sender":{"key":"remi.galan-alfonso@ensimag.grenoble-inp.fr","avatar":"https://avatars.githubusercontent.com/u/12509162?v=4"},"body":"Ville Skyttä <ville.skytta@iki.fi> writes:\n> On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso\n> <remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:\n> >\n> > Hi,\n> >\n> > Ville Skyttä <ville.skytta@iki.fi> writes:\n> > >          while [ $c -lt $cword ]; do\n> > >                  i=\"${words[c]}\"\n> > >                  case \"$i\" in\n> > > -                -d|-m)        only_local_ref=\"y\" ;;\n> > > -                -r)        has_r=\"y\" ;;\n> > > +                -d|-m|--move)        only_local_ref=\"y\" ;;\n> >\n> > \"While you're at it\" you might want to do the same thing for\n> > `--delete`.\n> \n> I'm afraid the \"while I'm at it\" would never end if I start looking\n> deeper into missing things there, so I'd prefer this self contained\n> one I keep running into myself applied first.\n\nI understand, though adding `--delete` here makes sense since there is\nalready the short-hand `-d` that is tested (like you added `--move`\nsince the short-hand `-m` is tested).\nHowever adding it here means that we should also add it in completion\nlist below. Thinking about it, it might be better to have it in a\nseparate patch, so no further objections with this patch.\n\n> \n> > > +                -r)                has_r=\"y\" ;;\n> >\n> > You are introducing an additional tab here that you probably didn't\n> > want.\n> \n> It was intentionally added it to keep \"only_local_ref\" and \"has_r\"\n> tab-aligned the way they already were.\n\nAh indeed, my bad, I didn't see it.\n\nThanks,\nRémi\n"},{"id":"293465","messageId":"1470735284-5686-1-git-send-email-ville.skytta@iki.fi","threadId":"42538","inReplyTo":"1120818262.376555.1465290963431.JavaMail.zimbra@ensimag.grenoble-inp.fr","subject":"[PATCH v2] completion: complete --delete, --move, and --remotes for git branch","fromName":"Ville Skyttä","fromEmail":"ville.skytta@iki.fi","sentAt":"2016-08-09T09:34:44Z","receivedAt":"2016-08-09T09:34:53Z","isPatch":true,"sender":{"key":"ville.skytta@iki.fi","avatar":"https://avatars.githubusercontent.com/u/109152?v=4"},"body":"Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>\n---\n contrib/completion/git-completion.bash | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 6a187bc..76abbd1 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1008,8 +1008,8 @@ _git_branch ()\n \twhile [ $c -lt $cword ]; do\n \t\ti=\"${words[c]}\"\n \t\tcase \"$i\" in\n-\t\t-d|-m)\tonly_local_ref=\"y\" ;;\n-\t\t-r)\thas_r=\"y\" ;;\n+\t\t-d|--delete|-m|--move)\tonly_local_ref=\"y\" ;;\n+\t\t-r|--remotes)\t\thas_r=\"y\" ;;\n \t\tesac\n \t\t((c++))\n \tdone\n@@ -1023,7 +1023,7 @@ _git_branch ()\n \t\t\t--color --no-color --verbose --abbrev= --no-abbrev\n \t\t\t--track --no-track --contains --merged --no-merged\n \t\t\t--set-upstream-to= --edit-description --list\n-\t\t\t--unset-upstream\n+\t\t\t--unset-upstream --delete --move --remotes\n \t\t\t\"\n \t\t;;\n \t*)\n-- \n2.5.5\n\n"},{"id":"293519","messageId":"xmqqh9ataj87.fsf@gitster.mtv.corp.google.com","threadId":"42538","inReplyTo":"1470735284-5686-1-git-send-email-ville.skytta@iki.fi","subject":"Re: [PATCH v2] completion: complete --delete, --move, and --remotes for git branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-09T18:30:00Z","receivedAt":"2016-08-09T18:30:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ville Skyttä <ville.skytta@iki.fi> writes:\n\n> Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>\n> ---\n>  contrib/completion/git-completion.bash | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 6a187bc..76abbd1 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1008,8 +1008,8 @@ _git_branch ()\n>  \twhile [ $c -lt $cword ]; do\n>  \t\ti=\"${words[c]}\"\n>  \t\tcase \"$i\" in\n> -\t\t-d|-m)\tonly_local_ref=\"y\" ;;\n> -\t\t-r)\thas_r=\"y\" ;;\n> +\t\t-d|--delete|-m|--move)\tonly_local_ref=\"y\" ;;\n> +\t\t-r|--remotes)\t\thas_r=\"y\" ;;\n>  \t\tesac\n>  \t\t((c++))\n>  \tdone\n\nSounds sensible; we already had \"-d\" but not its fully-spelled\nvariant, and you are adding it (together with its friends).\n\nWill queue.\n\n> @@ -1023,7 +1023,7 @@ _git_branch ()\n>  \t\t\t--color --no-color --verbose --abbrev= --no-abbrev\n>  \t\t\t--track --no-track --contains --merged --no-merged\n>  \t\t\t--set-upstream-to= --edit-description --list\n> -\t\t\t--unset-upstream\n> +\t\t\t--unset-upstream --delete --move --remotes\n>  \t\t\t\"\n>  \t\t;;\n>  \t*)\n"}]}