{"thread":{"id":"26081","subject":"[PATCH v2 resend] bash completion: add basic support for git-reflog","startedAt":"2010-12-16T06:56:08Z","lastAt":"2010-12-16T07:15:28Z","messageCount":2,"participants":["Tay Ray Chuan","Jonathan Nieder"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"158205","messageId":"20101216145608.000004df@unknown","threadId":"26081","inReplyTo":null,"subject":"[PATCH v2 resend] bash completion: add basic support for git-reflog","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-12-16T06:56:08Z","receivedAt":"2010-12-16T06:56:08Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"\"Promote\" the reflog command out of plumbing, so that we now run\ncompletion for it. After all, it's listed under porcelain (ancillary),\nand we do run completion for those commands.\n\nAdd basic completion for the three subcommands - show, expire, delete.\nTry completing refs for these too.\n\nHelped-by: SZEDER Gábor <szeder@ira.uka.de>\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n\nresend note:\nThis didn't seem to have been picked up. FYI, Johnathan\nmade a comment, but it was non-blocking, so I didn't change anything.\n\nChanged from v1: \n - picked up Gábor's suggestion on using __git_find_on_cmdline()\n   to correctly handle situations where subcommands are used with dashed\n   options.\n - don't \"hide\" reflog anymore - run completion for it too.\n\nGábor: hmm, it really seems that reflog is treated as plumbing - no completion\nis done for it. Even get-tar-commit-id (I've never used this before) is treated\nbetter than reflog. Shall do something about it!\n\n contrib/completion/git-completion.bash |   13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex f710469..6732b1d 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -735,7 +735,6 @@ __git_list_porcelain_commands ()\n \t\tquiltimport)      : import;;\n \t\tread-tree)        : plumbing;;\n \t\treceive-pack)     : plumbing;;\n-\t\treflog)           : plumbing;;\n \t\tremote-*)         : transport;;\n \t\trepo-config)      : deprecated;;\n \t\trerere)           : plumbing;;\n@@ -1632,6 +1631,18 @@ _git_rebase ()\n \t__gitcomp \"$(__git_refs)\"\n }\n \n+_git_reflog ()\n+{\n+\tlocal subcommands=\"show delete expire\"\n+\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n+\n+\tif [ -z \"$subcommand\" ]; then\n+\t\t__gitcomp \"$subcommands\"\n+\telse\n+\t\t__gitcomp \"$(__git_refs)\"\n+\tfi\n+}\n+\n __git_send_email_confirm_options=\"always never auto cc compose\"\n __git_send_email_suppresscc_options=\"author self cc bodycc sob cccmd body all\"\n \n-- \n1.7.3.2.493.g2b058\n"},{"id":"158206","messageId":"20101216071528.GA3753@burratino","threadId":"26081","inReplyTo":"20101216145608.000004df@unknown","subject":"Re: [PATCH v2 resend] bash completion: add basic support for git-reflog","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-12-16T07:15:28Z","receivedAt":"2010-12-16T07:15:28Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Tay Ray Chuan wrote:\n\n> \"Promote\" the reflog command out of plumbing, so that we now run\n> completion for it. After all, it's listed under porcelain (ancillary),\n> and we do run completion for those commands.\n\nGood point.\n\n[...]\n> Even get-tar-commit-id (I've never used this before) is treated\n> better than reflog.\n\nIt's handy from time to time. :)\n\nThanks, and sorry to miss the point before.  The patch looks good.\n"}]}