{"thread":{"id":"3111","subject":"[PATCH] git-{fetch,peek-remote} handling of --upload-pack","startedAt":"2006-01-20T18:38:16Z","lastAt":"2006-01-22T03:41:34Z","messageCount":2,"participants":["Michal Ostrowski","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"14960","messageId":"E1F019M-0003Cf-Ln@heater.watson.ibm.com","threadId":"3111","inReplyTo":null,"subject":"[PATCH] git-{fetch,peek-remote} handling of --upload-pack","fromName":"Michal Ostrowski","fromEmail":"mostrows@watson.ibm.com","sentAt":"2006-01-20T18:38:16Z","receivedAt":"2006-01-20T18:38:16Z","isPatch":true,"sender":{"key":"mostrows@watson.ibm.com","avatar":null},"body":"git-peek-remote needs to handle a -u|--upload-pack parameter just like\ngit-fetch (and git-fetch has to pass it on to git-peek-remote).\n\n(This is actually a follow-up to my previous git-fetch patch.)\n\nSigned-off-by: Michal Ostrowski <mostrows@heater.watson.ibm.com>\n\n---\n\n git-fetch.sh     |    6 ++++--\n git-ls-remote.sh |   13 ++++++++++---\n 2 files changed, 14 insertions(+), 5 deletions(-)\n\n86e69492820679894278a20dd9d9768a07f78f96\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex d1659e2..6b02098 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -18,6 +18,7 @@ force=\n verbose=\n update_head_ok=\n exec=\n+upload_pack=\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n@@ -28,6 +29,7 @@ do\n \t--upload-pac|--upload-pack)\n \t\tshift\n \t\texec=\"--exec=$1\" \n+\t\tupload_pack=\"-u $1\"\n \t\t;;\n \t-f|--f|--fo|--for|--forc|--force)\n \t\tforce=t\n@@ -202,7 +204,7 @@ reflist=$(get_remote_refs_for_fetch \"$@\"\n if test \"$tags\"\n then\n \ttaglist=$(IFS=\"\t\" &&\n-\t\t  git-ls-remote --tags \"$remote\" |\n+\t\t  git-ls-remote $upload_pack --tags \"$remote\" |\n \t          while read sha1 name\n \t\t  do\n \t\t\tcase \"$name\" in\n@@ -367,7 +369,7 @@ fetch_main \"$reflist\"\n case \"$no_tags$tags\" in\n '')\n \ttaglist=$(IFS=\" \" &&\n-    \tgit-ls-remote --tags \"$remote\" |\n+    \tgit-ls-remote $upload_pack --tags \"$remote\" |\n \tsed -ne 's|^\\([0-9a-f]*\\)[ \t]\\(refs/tags/.*\\)^{}$|\\1 \\2|p' |\n \twhile read sha1 name\n \tdo\ndiff --git a/git-ls-remote.sh b/git-ls-remote.sh\nindex f699268..64f37af 100755\n--- a/git-ls-remote.sh\n+++ b/git-ls-remote.sh\n@@ -2,7 +2,8 @@\n #\n \n usage () {\n-    echo >&2 \"usage: $0 [--heads] [--tags] <repository> <refs>...\"\n+    echo >&2 \"usage: $0 [--heads] [--tags] [-u|--upload-pack <upload-pack>]\"\n+    echo >&2 \"          <repository> <refs>...\"\n     exit 1;\n }\n \n@@ -11,6 +12,7 @@ die () {\n     exit 1\n }\n \n+exec=\n while case \"$#\" in 0) break;; esac\n do\n   case \"$1\" in\n@@ -18,6 +20,11 @@ do\n   heads=heads; shift ;;\n   -t|--t|--ta|--tag|--tags)\n   tags=tags; shift ;;\n+  -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\\\n+  --upload-pac|--upload-pack)\n+\tshift\n+\texec=\"--exec=$1\" \n+\tshift;;\n   --)\n   shift; break ;;\n   -*)\n@@ -34,7 +41,7 @@ case \",$heads,$tags,\" in\n esac\n \n . git-parse-remote\n-peek_repo=\"$(get_remote_url \"$@\")\"\n+peek_repo=\"$(get_remote_url $*)\"\n shift\n \n tmp=.ls-remote-$$\n@@ -66,7 +73,7 @@ rsync://* )\n \t;;\n \n * )\n-\tgit-peek-remote \"$peek_repo\" ||\n+\tgit-peek-remote $exec \"$peek_repo\" ||\n \t\techo \"failed\tslurping\"\n \t;;\n esac |\n-- \n1.1.4.g0b63-dirty\n"},{"id":"15028","messageId":"7vlkx9gc9d.fsf@assigned-by-dhcp.cox.net","threadId":"3111","inReplyTo":"E1F019M-0003Cf-Ln@heater.watson.ibm.com","subject":"Re: [PATCH] git-{fetch,peek-remote} handling of --upload-pack","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-22T03:41:34Z","receivedAt":"2006-01-22T03:41:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michal Ostrowski <mostrows@watson.ibm.com> writes:\n\n> git-peek-remote needs to handle a -u|--upload-pack parameter just like\n> git-fetch (and git-fetch has to pass it on to git-peek-remote).\n>\n> (This is actually a follow-up to my previous git-fetch patch.)\n\nThanks.\n\nEverything else looks good, but I have one question.  What is\nthis hunk about?\n\n> diff --git a/git-ls-remote.sh b/git-ls-remote.sh\n> index f699268..64f37af 100755\n> --- a/git-ls-remote.sh\n> +++ b/git-ls-remote.sh\n>...\n> @@ -34,7 +41,7 @@ case \",$heads,$tags,\" in\n>  esac\n>  \n>  . git-parse-remote\n> -peek_repo=\"$(get_remote_url \"$@\")\"\n> +peek_repo=\"$(get_remote_url $*)\"\n>  shift\n>  \n>  tmp=.ls-remote-$$\n"}]}