{"thread":{"id":"1232","subject":"[PATCH] Documentation: clone/fetch/upload.","startedAt":"2005-07-14T07:08:37Z","lastAt":"2005-07-14T07:08:37Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6116","messageId":"7v64vdkgp6.fsf@assigned-by-dhcp.cox.net","threadId":"1232","inReplyTo":null,"subject":"[PATCH] Documentation: clone/fetch/upload.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-14T07:08:37Z","receivedAt":"2005-07-14T07:08:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This adds documentation for 'smarter pull' family of commands.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n Documentation/git-clone-pack.txt  |   13 +++++--\n Documentation/git-fetch-pack.txt  |   73 +++++++++++++++++++++++++++++++++++++\n Documentation/git-upload-pack.txt |   40 ++++++++++++++++++++\n fetch-pack.c                      |   11 ++++--\n 4 files changed, 130 insertions(+), 7 deletions(-)\n create mode 100644 Documentation/git-fetch-pack.txt\n create mode 100644 Documentation/git-upload-pack.txt\n\n1ac6853af4e4a24eaf7008be9b4e9e033bc624f1\ndiff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt\n--- a/Documentation/git-clone-pack.txt\n+++ b/Documentation/git-clone-pack.txt\n@@ -9,7 +9,7 @@ git-clone-pack - Clones a repository by \n \n SYNOPSIS\n --------\n-'git-clone-pack' [-q] [--exec=<git-upload-pack>] [<host>:]<directory> [<heads>...]\n+'git-clone-pack' [-q] [--exec=<git-upload-pack>] [<host>:]<directory> [<head>...]\n \n DESCRIPTION\n -----------\n@@ -36,10 +36,15 @@ OPTIONS\n \tshells by having a lean .bashrc file (they set most of\n \tthe things up in .bash_profile).\n \n-[<host>:]<directory::\n-\tThe (possibly remote) repository to clone from.\n+<host>::\n+\tA remote host that houses the repository.  When this\n+\tpart is specified, 'git-upload-pack' is invoked via\n+\tssh.\n \n-<heads>...::\n+<directory>::\n+\tThe repository to sync from.\n+\n+<head>...::\n \tThe heads to update.  This is relative to $GIT_DIR\n \t(e.g. \"HEAD\", \"refs/heads/master\").  When unspecified,\n \tall heads are updated to match the remote repository.\ndiff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt\nnew file mode 100644\n--- /dev/null\n+++ b/Documentation/git-fetch-pack.txt\n@@ -0,0 +1,73 @@\n+git-fetch-pack(1)\n+=================\n+v0.1, July 2005\n+\n+NAME\n+----\n+git-fetch-pack - Receive missing objects from another repository.\n+\n+\n+SYNOPSIS\n+--------\n+git-fetch-pack [-q] [--exec=<git-upload-pack>] [<host>:]<directory> [<head>...] < <commit-list>\n+\n+DESCRIPTION\n+-----------\n+Invokes 'git-upload-pack' on a potentially remote repository,\n+and asks it to send objects missing from this repository, to\n+update the named heads.  The list of commits available locally\n+is fed from the standard input, to be sent to 'git-upload-pack'\n+running on the other end.\n+\n+This command can be used only when the local side has a common\n+(ancestor) commit with the remote head that is being pulled\n+from.  Use 'git-clone-pack' for that.\n+\n+\n+OPTIONS\n+-------\n+-q::\n+\tPass '-q' flag to 'git-unpack-objects'; this makes the\n+\tcloning process less verbose.\n+\n+--exec=<git-upload-pack>::\n+\tUse this to specify the path to 'git-upload-pack' on the\n+\tremote side, if is not found on your $PATH.\n+\tInstallations of sshd ignores the user's environment\n+\tsetup scripts for login shells (e.g. .bash_profile) and\n+\tyour privately installed GIT may not be found on the system\n+\tdefault $PATH.  Another workaround suggested is to set\n+\tup your $PATH in \".bashrc\", but this flag is for people\n+\twho do not want to pay the overhead for non-interactive\n+\tshells by having a lean .bashrc file (they set most of\n+\tthe things up in .bash_profile).\n+\n+<host>::\n+\tA remote host that houses the repository.  When this\n+\tpart is specified, 'git-upload-pack' is invoked via\n+\tssh.\n+\n+<directory>::\n+\tThe repository to sync from.\n+\n+<head>...::\n+\tThe remote heads to update from. This is relative to\n+\t$GIT_DIR (e.g. \"HEAD\", \"refs/heads/master\").  When\n+\tunspecified, update from all heads the remote side has.\n+\n+\tHowever the program refuses to work if more than one\n+\tremote head matches the specified heads.  I am not sure\n+\twhat this means... Help!!!!!\n+\n+\n+Author\n+------\n+Written by Linus Torvalds <torvalds@osdl.org>\n+\n+Documentation\n+--------------\n+Documentation by Junio C Hamano.\n+\n+GIT\n+---\n+Part of the link:git.html[git] suite\ndiff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt\nnew file mode 100644\n--- /dev/null\n+++ b/Documentation/git-upload-pack.txt\n@@ -0,0 +1,40 @@\n+git-upload-pack(1)\n+==================\n+v0.1, July 2005\n+\n+NAME\n+----\n+git-upload-pack - Send missing objects packed.\n+\n+\n+SYNOPSIS\n+--------\n+'git-upload-pack' <directory>\n+\n+DESCRIPTION\n+-----------\n+Invoked by 'git-clone-pack' and/or 'git-fetch-pack', learns what\n+objects the other side is missing, and sends them after packing.\n+\n+This command is usually not invoked directly by the end user.\n+The UI for the protocol is on the 'git-fetch-pack' side, and the\n+program pair is meant to be used to pull updates from a remote\n+repository.  For push operations, see 'git-send-pack'.\n+\n+\n+OPTIONS\n+-------\n+<directory>::\n+\tThe repository to sync from.\n+\n+Author\n+------\n+Written by Linus Torvalds <torvalds@osdl.org>\n+\n+Documentation\n+--------------\n+Documentation by Junio C Hamano.\n+\n+GIT\n+---\n+Part of the link:git.html[git] suite\ndiff --git a/fetch-pack.c b/fetch-pack.c\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -3,7 +3,8 @@\n #include \"pkt-line.h\"\n #include <sys/wait.h>\n \n-static const char fetch_pack_usage[] = \"git-fetch-pack [host:]directory [heads]* < mycommitlist\";\n+static int quiet;\n+static const char fetch_pack_usage[] = \"git-fetch-pack [-q] [--exec=upload-pack] [host:]directory [heads]* < mycommitlist\";\n static const char *exec = \"git-upload-pack\";\n \n static int find_common(int fd[2], unsigned char *result_sha1, unsigned char *remote)\n@@ -98,7 +99,8 @@ static int fetch_pack(int fd[2], int nr_\n \t\tdup2(fd[0], 0);\n \t\tclose(fd[0]);\n \t\tclose(fd[1]);\n-\t\texeclp(\"git-unpack-objects\", \"git-unpack-objects\", NULL);\n+\t\texeclp(\"git-unpack-objects\", \"git-unpack-objects\",\n+\t\t       quiet ? \"-q\" : NULL, NULL);\n \t\tdie(\"git-unpack-objects exec failed\");\n \t}\n \tclose(fd[0]);\n@@ -134,7 +136,10 @@ int main(int argc, char **argv)\n \t\tchar *arg = argv[i];\n \n \t\tif (*arg == '-') {\n-\t\t\t/* Arguments go here */\n+\t\t\tif (!strncmp(\"--exec=\", arg, 7)) {\n+\t\t\t\texec = arg + 7;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tusage(fetch_pack_usage);\n \t\t}\n \t\tdest = arg;\n"}]}