{"thread":{"id":"3110","subject":"[PATCH] --upload-pack for git-fetch","startedAt":"2006-01-20T18:05:24Z","lastAt":"2006-01-20T18:05:24Z","messageCount":1,"participants":["Michal Ostrowski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"14957","messageId":"E1F00dY-0002XH-Nw@heater.watson.ibm.com","threadId":"3110","inReplyTo":null,"subject":"[PATCH] --upload-pack for git-fetch","fromName":"Michal Ostrowski","fromEmail":"mostrows@watson.ibm.com","sentAt":"2006-01-20T18:05:24Z","receivedAt":"2006-01-20T18:05:24Z","isPatch":true,"sender":{"key":"mostrows@watson.ibm.com","avatar":null},"body":"Implement  \"git-clone\"'s \"--upload-pack\" parameter in git-fetch, making\nit available for git-pull.  Without this, there is no way to specify a\nremote executable when invoking git-pull/git-fetch as there is for\ngit-clone.\n\nSigned-off-by: Michal Ostrowski <mostrows@watson.ibm.com>\n\n---\n\n Documentation/fetch-options.txt |    7 +++++++\n git-fetch.sh                    |    8 +++++++-\n 2 files changed, 14 insertions(+), 1 deletions(-)\n\n0b6314bc51945c2ce1e4c8627a00779c23bef3e1\ndiff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt\nindex e624d3d..8323756 100644\n--- a/Documentation/fetch-options.txt\n+++ b/Documentation/fetch-options.txt\n@@ -3,6 +3,13 @@\n \texisting contents of `.git/FETCH_HEAD`.  Without this\n \toption old data in `.git/FETCH_HEAD` will be overwritten.\n \n+--upload-pack <upload-pack>::\n+-u <upload-pack>::\n+        When given, and the repository to fetch from is handled\n+        by 'git-fetch-pack', '--exec=<upload-pack>' is passed to\n+        the command to specify non-default path for the command\n+        run on the other end.\n+\n -f, \\--force::\n \tWhen `git-fetch` is used with `<rbranch>:<lbranch>`\n \trefspec, it refuses to update the local branch\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 4a0cb32..d1659e2 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -17,12 +17,18 @@ append=\n force=\n verbose=\n update_head_ok=\n+exec=\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n \t-a|--a|--ap|--app|--appe|--appen|--append)\n \t\tappend=t\n \t\t;;\n+\t-u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\\\n+\t--upload-pac|--upload-pack)\n+\t\tshift\n+\t\texec=\"--exec=$1\" \n+\t\t;;\n \t-f|--f|--fo|--for|--forc|--force)\n \t\tforce=t\n \t\t;;\n@@ -312,7 +318,7 @@ fetch_main () {\n     ( : subshell because we muck with IFS\n       IFS=\" \t$LF\"\n       (\n-\t  git-fetch-pack $keep \"$remote\" $rref || echo failed \"$remote\"\n+\t  git-fetch-pack $exec $keep \"$remote\" $rref || echo failed \"$remote\"\n       ) |\n       while read sha1 remote_name\n       do\n-- \n1.1.4.ge755-dirty\n"}]}