{"thread":{"id":"13186","subject":"[PATCH] completion: remove use of dashed git commands","startedAt":"2008-04-20T17:28:44Z","lastAt":"2008-04-20T19:34:07Z","messageCount":11,"participants":["Dan McGee","Johannes Schindelin","Junio C Hamano","Matthieu Moy","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"74814","messageId":"1208712525-1747-1-git-send-email-dpmcgee@gmail.com","threadId":"13186","inReplyTo":null,"subject":"[PATCH] completion: remove use of dashed git commands","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-04-20T17:28:44Z","receivedAt":"2008-04-20T17:28:44Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n---\n contrib/completion/git-completion.bash |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 4d81963..3f78630 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -152,7 +152,7 @@ __git_heads ()\n \t\tdone\n \t\treturn\n \tfi\n-\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n+\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n \t\tcase \"$is_hash,$i\" in\n \t\ty,*) is_hash=n ;;\n \t\tn,*^{}) is_hash=y ;;\n@@ -173,7 +173,7 @@ __git_tags ()\n \t\tdone\n \t\treturn\n \tfi\n-\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n+\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n \t\tcase \"$is_hash,$i\" in\n \t\ty,*) is_hash=n ;;\n \t\tn,*^{}) is_hash=y ;;\n@@ -200,7 +200,7 @@ __git_refs ()\n \t\tdone\n \t\treturn\n \tfi\n-\tfor i in $(git-ls-remote \"$dir\" 2>/dev/null); do\n+\tfor i in $(git ls-remote \"$dir\" 2>/dev/null); do\n \t\tcase \"$is_hash,$i\" in\n \t\ty,*) is_hash=n ;;\n \t\tn,*^{}) is_hash=y ;;\n@@ -223,7 +223,7 @@ __git_refs2 ()\n __git_refs_remotes ()\n {\n \tlocal cmd i is_hash=y\n-\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n+\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n \t\tcase \"$is_hash,$i\" in\n \t\tn,refs/heads/*)\n \t\t\tis_hash=y\n-- \n1.5.5\n"},{"id":"74815","messageId":"1208712525-1747-2-git-send-email-dpmcgee@gmail.com","threadId":"13186","inReplyTo":"1208712525-1747-1-git-send-email-dpmcgee@gmail.com","subject":"[PATCH] completion: allow 'git remote' subcommand completion","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-04-20T17:28:45Z","receivedAt":"2008-04-20T17:28:45Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"After typing 'git prune ', the subcommand options were not shown. Fix it.\n\nSigned-off-by: Dan McGee <dpmcgee@gmail.com>\n---\n contrib/completion/git-completion.bash |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 3f78630..6012047 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1052,6 +1052,7 @@ _git_remote ()\n \tlocal subcommands=\"add rm show prune update\"\n \tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n \tif [ -z \"$subcommand\" ]; then\n+\t\t__gitcomp \"$subcommands\"\n \t\treturn\n \tfi\n \n-- \n1.5.5\n"},{"id":"74816","messageId":"alpine.DEB.1.00.0804201841570.5084@eeepc-johanness","threadId":"13186","inReplyTo":"1208712525-1747-1-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-04-20T17:43:37Z","receivedAt":"2008-04-20T17:43:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 20 Apr 2008, Dan McGee wrote:\n\n> [no commit message]\n\nI would like to deprecate dashed form _officially_ first (as in \nReleaseNotes), before doing something that could lead to quite some \nsurprised users.\n\nCiao,\nDscho\n"},{"id":"74817","messageId":"449c10960804201049o1c8f0be4m36dc5ce2afec2de6@mail.gmail.com","threadId":"13186","inReplyTo":"alpine.DEB.1.00.0804201841570.5084@eeepc-johanness","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-04-20T17:49:06Z","receivedAt":"2008-04-20T17:49:06Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n>  On Sun, 20 Apr 2008, Dan McGee wrote:\n>\n>  > [no commit message]\n>\n>  I would like to deprecate dashed form _officially_ first (as in\n>  ReleaseNotes), before doing something that could lead to quite some\n>  surprised users.\n\nNow you've confused me. From Documentation/RelNotes-1.5.4.txt, it\nseems fairly clear that dashed command forms are deprecated.\n\nThis patch was rather non-intrusive- it only updated the bash\ncompletion script to use the non-dashed forms. I'm not sure how this\nleads to surprised users at all.\n\n-Dan\n\n(Sorry for the double send, forgot the reply-all the first time. Looks\nlike I need another Sunday cup of coffee.)\n"},{"id":"74818","messageId":"7vskxgbejn.fsf@gitster.siamese.dyndns.org","threadId":"13186","inReplyTo":"alpine.DEB.1.00.0804201841570.5084@eeepc-johanness","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-20T17:51:24Z","receivedAt":"2008-04-20T17:51:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Sun, 20 Apr 2008, Dan McGee wrote:\n>\n>> [no commit message]\n>\n> I would like to deprecate dashed form _officially_ first (as in \n> ReleaseNotes), before doing something that could lead to quite some \n> surprised users.\n\nI'd share your distaste against an empty log message to justify the\nchanges, but I do not see where those \"quite some surprised users\" would\ncome from.\n\nAt least people know \"git foo\" form is and has been supported, so if\nsomebody changes \"git-ls-files\" to \"git ls-files\", nobody would go \"gee, I\ndid not know I can write it without dash\" these days...\n"},{"id":"74819","messageId":"alpine.DEB.1.00.0804201853150.5084@eeepc-johanness","threadId":"13186","inReplyTo":"449c10960804201049o1c8f0be4m36dc5ce2afec2de6@mail.gmail.com","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-04-20T17:54:06Z","receivedAt":"2008-04-20T17:54:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 20 Apr 2008, Dan McGee wrote:\n\n> On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>\n> >  On Sun, 20 Apr 2008, Dan McGee wrote:\n> >\n> >  > [no commit message]\n> >\n> >  I would like to deprecate dashed form _officially_ first (as in \n> >  ReleaseNotes), before doing something that could lead to quite some \n> >  surprised users.\n> \n> Now you've confused me. From Documentation/RelNotes-1.5.4.txt, it\n> seems fairly clear that dashed command forms are deprecated.\n\nOh, I must have missed that.  Nevertheless, I think it should be \nsynchronised with when the dashed commands vanish from the default \ninstallation.\n\nCiao,\nDscho\n"},{"id":"74820","messageId":"449c10960804201058h7322590eg9864be2c652b0091@mail.gmail.com","threadId":"13186","inReplyTo":"alpine.DEB.1.00.0804201853150.5084@eeepc-johanness","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-04-20T17:58:35Z","receivedAt":"2008-04-20T17:58:35Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"On Sun, Apr 20, 2008 at 12:54 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n>  On Sun, 20 Apr 2008, Dan McGee wrote:\n>\n>  > On Sun, Apr 20, 2008 at 12:43 PM, Johannes Schindelin\n>  > <Johannes.Schindelin@gmx.de> wrote:\n>  >\n>\n> > >  On Sun, 20 Apr 2008, Dan McGee wrote:\n>  > >\n>  > >  > [no commit message]\n>  > >\n>  > >  I would like to deprecate dashed form _officially_ first (as in\n>  > >  ReleaseNotes), before doing something that could lead to quite some\n>  > >  surprised users.\n>  >\n>  > Now you've confused me. From Documentation/RelNotes-1.5.4.txt, it\n>  > seems fairly clear that dashed command forms are deprecated.\n>\n>  Oh, I must have missed that.  Nevertheless, I think it should be\n>  synchronised with when the dashed commands vanish from the default\n>  installation.\n\n>From the RelNotes:\n   Users are strongly encouraged to adjust their habits and scripts now\n   to prepare for this change.\n\nIt seems like setting a good example would be prudent, so I attempted\nto do that here. If adding a commit message referencing the\ndocumentation would have helped, then I'm sorry for that, but I've\nsubmitted patches like this in the past (22fa97) without near as much\nhassle as I'm getting for this small change.\n\n-Dan\n"},{"id":"74823","messageId":"vpqwsmstl1u.fsf@bauges.imag.fr","threadId":"13186","inReplyTo":"alpine.DEB.1.00.0804201853150.5084@eeepc-johanness","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-04-20T18:53:33Z","receivedAt":"2008-04-20T18:53:33Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Oh, I must have missed that.  Nevertheless, I think it should be \n> synchronised with when the dashed commands vanish from the default \n> installation.\n\nI think you missed the point of the patch.\n\nIt removes _uses_ of dashed-form in the completion script, but doesn't\nremove completion for dashed forms. That could be made clear in the\ncommit message to avoid confusion.\n\n-- \nMatthieu\n"},{"id":"74824","messageId":"20080420192054.GH29771@spearce.org","threadId":"13186","inReplyTo":"1208712525-1747-1-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] completion: remove use of dashed git commands","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-04-20T19:20:54Z","receivedAt":"2008-04-20T19:20:54Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Dan McGee <dpmcgee@gmail.com> wrote:\n> Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n> ---\n>  contrib/completion/git-completion.bash |    8 ++++----\n>  1 files changed, 4 insertions(+), 4 deletions(-)\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\nDespite Dscho's remarks, this is a change that is harmless and\nshould be happening before we officially remove the dashed forms\nfrom the user's path.\n \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 4d81963..3f78630 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -152,7 +152,7 @@ __git_heads ()\n>  \t\tdone\n>  \t\treturn\n>  \tfi\n> -\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n> +\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n>  \t\tcase \"$is_hash,$i\" in\n>  \t\ty,*) is_hash=n ;;\n>  \t\tn,*^{}) is_hash=y ;;\n> @@ -173,7 +173,7 @@ __git_tags ()\n>  \t\tdone\n>  \t\treturn\n>  \tfi\n> -\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n> +\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n>  \t\tcase \"$is_hash,$i\" in\n>  \t\ty,*) is_hash=n ;;\n>  \t\tn,*^{}) is_hash=y ;;\n> @@ -200,7 +200,7 @@ __git_refs ()\n>  \t\tdone\n>  \t\treturn\n>  \tfi\n> -\tfor i in $(git-ls-remote \"$dir\" 2>/dev/null); do\n> +\tfor i in $(git ls-remote \"$dir\" 2>/dev/null); do\n>  \t\tcase \"$is_hash,$i\" in\n>  \t\ty,*) is_hash=n ;;\n>  \t\tn,*^{}) is_hash=y ;;\n> @@ -223,7 +223,7 @@ __git_refs2 ()\n>  __git_refs_remotes ()\n>  {\n>  \tlocal cmd i is_hash=y\n> -\tfor i in $(git-ls-remote \"$1\" 2>/dev/null); do\n> +\tfor i in $(git ls-remote \"$1\" 2>/dev/null); do\n>  \t\tcase \"$is_hash,$i\" in\n>  \t\tn,refs/heads/*)\n>  \t\t\tis_hash=y\n> -- \n> 1.5.5\n> \n\n-- \nShawn.\n"},{"id":"74825","messageId":"20080420192259.GI29771@spearce.org","threadId":"13186","inReplyTo":"1208712525-1747-2-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] completion: allow 'git remote' subcommand completion","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-04-20T19:22:59Z","receivedAt":"2008-04-20T19:22:59Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Dan McGee <dpmcgee@gmail.com> wrote:\n> After typing 'git prune ', the subcommand options were not shown. Fix it.\n\nThat's not really what this change does.  It fixes the subcommands\nfor 'git remote ', which were broken without this __gitcomp call\nin this location.\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\nbut I'd like to see a more accurate commit message for this fix.\n \n> Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n> ---\n>  contrib/completion/git-completion.bash |    1 +\n>  1 files changed, 1 insertions(+), 0 deletions(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 3f78630..6012047 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1052,6 +1052,7 @@ _git_remote ()\n>  \tlocal subcommands=\"add rm show prune update\"\n>  \tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n>  \tif [ -z \"$subcommand\" ]; then\n> +\t\t__gitcomp \"$subcommands\"\n>  \t\treturn\n>  \tfi\n>  \n> -- \n> 1.5.5\n> \n\n-- \nShawn.\n"},{"id":"74827","messageId":"1208720047-5200-1-git-send-email-dpmcgee@gmail.com","threadId":"13186","inReplyTo":"20080420192259.GI29771@spearce.org","subject":"[PATCH] completion: allow 'git remote' subcommand completion","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-04-20T19:34:07Z","receivedAt":"2008-04-20T19:34:07Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"After typing 'git remote ', the subcommand options were not shown. Fix it\nby adding the missing __gitcomp call.\n\nSigned-off-by: Dan McGee <dpmcgee@gmail.com>\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n---\n\nResubmit per Shawn's comments- duh. I was just thinking backwards since\nremote has a prune subcommand.\n\n contrib/completion/git-completion.bash |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 3f78630..6012047 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1052,6 +1052,7 @@ _git_remote ()\n \tlocal subcommands=\"add rm show prune update\"\n \tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n \tif [ -z \"$subcommand\" ]; then\n+\t\t__gitcomp \"$subcommands\"\n \t\treturn\n \tfi\n \n-- \n1.5.5\n"}]}