{"thread":{"id":"21941","subject":"[PATCH] bash: Support new 'git fetch' options","startedAt":"2009-12-12T10:21:46Z","lastAt":"2009-12-12T21:24:52Z","messageCount":2,"participants":["Björn Gustavsson","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129796","messageId":"4B236EBA.6050806@gmail.com","threadId":"21941","inReplyTo":null,"subject":"[PATCH] bash: Support new 'git fetch' options","fromName":"Björn Gustavsson","fromEmail":"bgustavsson@gmail.com","sentAt":"2009-12-12T10:21:46Z","receivedAt":"2009-12-12T10:21:46Z","isPatch":true,"sender":{"key":"bgustavsson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/74840?v=4"},"body":"Support the new options --all, --prune, and --dry-run for\n'git fetch'.\n\nAs the --multiple option was primarily introduced to enable\n'git remote update' to be re-implemented in terms of 'git fetch'\n(16679e37) and is not likely to be used much from the command\nline, it does not seems worthwhile to complicate the code\n(to support completion of multiple remotes) to handle it.\n\nSigned-off-by: Björn Gustavsson <bgustavsson@gmail.com>\n---\n contrib/completion/git-completion.bash |   14 ++++++++++++--\n 1 files changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 7c18b0c..fbfa5f2 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -417,7 +417,17 @@ __git_complete_remote_or_refspec ()\n \twhile [ $c -lt $COMP_CWORD ]; do\n \t\ti=\"${COMP_WORDS[c]}\"\n \t\tcase \"$i\" in\n-\t\t--all|--mirror) [ \"$cmd\" = \"push\" ] && no_complete_refspec=1 ;;\n+\t\t--mirror) [ \"$cmd\" = \"push\" ] && no_complete_refspec=1 ;;\n+\t\t--all)\n+\t\t\tcase \"$cmd\" in\n+\t\t\tpush) no_complete_refspec=1 ;;\n+\t\t\tfetch)\n+\t\t\t\tCOMPREPLY=()\n+\t\t\t\treturn\n+\t\t\t\t;;\n+\t\t\t*) ;;\n+\t\t\tesac\n+\t\t\t;;\n \t\t-*) ;;\n \t\t*) remote=\"$i\"; break ;;\n \t\tesac\n@@ -1002,7 +1012,7 @@ _git_difftool ()\n \n __git_fetch_options=\"\n \t--quiet --verbose --append --upload-pack --force --keep --depth=\n-\t--tags --no-tags\n+\t--tags --no-tags --all --prune --dry-run\n \"\n \n _git_fetch ()\n-- \n1.6.6.rc2\n"},{"id":"129808","messageId":"20091212212452.GA407@spearce.org","threadId":"21941","inReplyTo":"4B236EBA.6050806@gmail.com","subject":"Re: [PATCH] bash: Support new 'git fetch' options","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-12-12T21:24:52Z","receivedAt":"2009-12-12T21:24:52Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Bj??rn Gustavsson <bgustavsson@gmail.com> wrote:\n> Support the new options --all, --prune, and --dry-run for\n> 'git fetch'.\n> \n> As the --multiple option was primarily introduced to enable\n> 'git remote update' to be re-implemented in terms of 'git fetch'\n> (16679e37) and is not likely to be used much from the command\n> line, it does not seems worthwhile to complicate the code\n> (to support completion of multiple remotes) to handle it.\n> \n> Signed-off-by: Bj??rn Gustavsson <bgustavsson@gmail.com>\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\nJunio, this belongs in 1.6.6 as its completion support for 1.6.6\nfeatures...\n\n-- \nShawn.\n"}]}