Commit graph

20 commits

Author SHA1 Message Date
Junio C Hamano 2247efb40b clone-pack: remove unused and undocumented --keep flag
While we are at it, give fully spelled --keep to fetch-pack.
Also give --quiet in addition to -q to fetch-pack as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-18 01:55:29 -08:00
Junio C Hamano ad89721508 fetch-pack: -k option to keep downloaded pack.
Split out the functions that deal with the socketpair after
finishing git protocol handshake to receive the packed data into
a separate file, and use it in fetch-pack to keep/explode the
received pack data.  We earlier had something like that on
clone-pack side once, but the list discussion resulted in the
decision that it makes sense to always keep the pack for
clone-pack, so unpacking option is not enabled on the clone-pack
side, but we later still could do so easily if we wanted to with
this change.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-17 23:11:29 -08:00
Junio C Hamano 31ec6abf88 clone-pack: make it usable for partial branch cloning.
clone-pack had some logic to accept subset of remote refs from
the command line and clone from there.  However, it was never
used in practice and its problems were not found out so far.

This commit changes the command to output the object names of
refs to the standard output instead of making a clone of the
remote repository when explicit <head> parameters are given; the
output format is the same as fetch-pack.

The traditional behaviour of cloning the whole repository by
giving no explicit <head> parameters stays the same.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-14 21:25:22 -08:00
Junio C Hamano 5a3277133d Make networking commands to work from a subdirectory.
These are whole-tree operations and there is not much point
making them operable from within a subdirectory, but it is easy
to do so, and using setup_git_directory() upfront helps git://
proxy specification picked up from the correct place.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28 23:13:02 -08:00
Johannes Schindelin 9e48b38999 Work around missing hard links on FAT formatted media
FAT -- like Coda -- does not like cross-directory hard links. To be
precise, FAT does not like links at all. But links are not needed either.
So get rid of them.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-25 23:49:43 -07:00
Junio C Hamano e1c7ada6dd git-clone: always keep pack sent from remote.
This deprecates --keep and -q flags and always keeps the pack
sent from the remote site.  Corresponding configuration
variables are also removed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-19 14:43:43 -07:00
Junio C Hamano 1a7141ff28 Ignore funny refname sent from remote
This allows the remote side (most notably, upload-pack) to show
additional information without affecting the downloader.  Peek-remote
does not ignore them -- this is to make it useful for Pasky's
automatic tag following.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-15 11:23:40 -07:00
Junio C Hamano d8a1deecc6 Refuse to create funny refs in clone-pack, git-fetch and receive-pack.
Using git-check-ref-format, make sure we do not create refs with
funny names when cloning from elsewhere (clone-pack), fast forwarding
local heads (git-fetch), or somebody pushes into us (receive-pack).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-15 11:23:39 -07:00
Junio C Hamano 64c381bf74 clone-pack: new option --keep tells it not to explode the pack.
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>
2005-10-12 18:32:03 -07:00
Junio C Hamano 11dcec07a4 clone-pack: new option --keep tells it not to explode the pack.
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>
2005-10-12 18:32:03 -07:00
Junio C Hamano 4cfc63db1d clone-pack: use create_symref() instead of raw symlink.
This was the last instance of symlink() in coreish part.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-05 15:29:48 -07:00
Timo Sirainen 4ec99bf080 [PATCH] -Werror fixes
GCC's format __attribute__ is good for checking errors, especially
with -Wformat=2 parameter. This fixes most of the reported problems
against 2005-08-09 snapshot.
2005-08-09 22:28:19 -07:00
Linus Torvalds d1c133f5d4 Merge three separate "fetch refs" functions
It really just boils down to one "get_remote_heads()" function, and a
common "struct ref" structure definition.
2005-07-16 13:55:50 -07:00
Junio C Hamano fd77911030 [PATCH] clone-pack: Typofix in the error message.
Cleans a small cut-and-paste mistake.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-13 20:53:33 -07:00
Junio C Hamano 6ec311da34 [PATCH] clone-pack and clone-script: documentation and add a missing parameter.
While adding the documentation for these two commands, I noticed
that the name of the program on the other end (git-upload-pack)
is already almost configurable but git-clone-pack lacked command
line parameter parsing to actually use anything but default, so
I introduced --exec= like other remote commands while I was at it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-13 20:42:26 -07:00
Linus Torvalds 5ccdf4cef2 Fix the "close before dup" bug in clone-pack too
Same issue as git-fetch-pack.
2005-07-13 20:05:17 -07:00
Linus Torvalds 167a4a3308 Add "-q" flag to "git commit"
Maybe you don't want the progress report.
2005-07-09 10:52:35 -07:00
Linus Torvalds dd7ba8b494 git-clone-pack: fix sparse warning
Local function that wasn't marked static
2005-07-06 18:51:56 -07:00
Junio C Hamano b2cb94254b [PATCH] clone-pack.c:write_one_ref() - Create leading directories.
The function write_one_ref() is passed the list of refs received
from the other end, which was obtained by directory traversal
under $GIT_DIR/refs; this can contain paths other than what
git-init-db prepares and would fail to clone when there is
such.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:39:58 -07:00
Linus Torvalds 1fcc8ea55d Add "git-clone-pack" program to help with "git clone" 2005-07-05 15:45:37 -07:00