summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11dcec0)
raw | patch | inline | side by side (parent: 11dcec0)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 13 Oct 2005 01:12:27 +0000 (18:12 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 13 Oct 2005 01:32:03 +0000 (18:32 -0700) |
With new option --keep, or a configuration item clone.keeppack (we
need a better name, or start allowing dash,"clone.keep-pack"), the packed
data downloaded while cloning is saved as a pack in .git/objects/pack/
locally, with index generated for it with git-index-pack.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
need a better name, or start allowing dash,"clone.keep-pack"), the packed
data downloaded while cloning is saved as a pack in .git/objects/pack/
locally, with index generated for it with git-index-pack.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-clone-pack.txt | patch | blob | history | |
clone-pack.c | patch | blob | history |
index 87c0e460d413c4ed0fb206414bf2c30ebf561ab7..b58165a5fc03a8556217599ef6a6f24f2f87f696 100644 (file)
SYNOPSIS
--------
-'git-clone-pack' [-q] [--exec=<git-upload-pack>] [<host>:]<directory> [<head>...]
+'git-clone-pack' [-q] [--keep] [--exec=<git-upload-pack>] [<host>:]<directory> [<head>...]
DESCRIPTION
-----------
Pass '-q' flag to 'git-unpack-objects'; this makes the
cloning process less verbose.
+--keep::
+ Do not invoke 'git-unpack-objects' on received data, but
+ create a single packfile out of it instead, and store it
+ in the object database.
+
--exec=<git-upload-pack>::
Use this to specify the path to 'git-upload-pack' on the
remote side, if it is not found on your $PATH.
diff --git a/clone-pack.c b/clone-pack.c
index 9567900aab1ce477a2c748cf1ce3d47c169b9c78..9a3371e1b2d71fb2e767363ad24ca20f17955ed2 100644 (file)
--- a/clone-pack.c
+++ b/clone-pack.c
static int quiet;
static int keep_pack;
-static const char clone_pack_usage[] = "git-clone-pack [-q] [--exec=<git-upload-pack>] [<host>:]<directory> [<heads>]*";
+static const char clone_pack_usage[] =
+"git-clone-pack [-q] [--keep] [--exec=<git-upload-pack>] [<host>:]<directory> [<heads>]*";
static const char *exec = "git-upload-pack";
static void clone_handshake(int fd[2], struct ref *ref)
snprintf(final, sizeof(final),
"%s/pack/pack-%s.pack", get_object_directory(), hash);
move_temp_to_file(pack_tmp_name, final);
+ chmod(final, 0444);
snprintf(final, sizeof(final),
"%s/pack/pack-%s.idx", get_object_directory(), hash);
move_temp_to_file(idx, final);
+ chmod(final, 0444);
return 0;
error_die: