author | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Feb 2006 08:45:38 +0000 (00:45 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Feb 2006 08:45:38 +0000 (00:45 -0800) |
* jc/pack-thin:
Use thin pack transfer in "git fetch".
Add git-push --thin.
Use thin pack transfer in "git fetch".
Add git-push --thin.
1 | 2 | |||
---|---|---|---|---|
upload-pack.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc upload-pack.c
index 3606529f61c50aa1c4d73877ccc4601ef036fcb5,3cdf4288b838c045b4524c7dd906525a39f0e67d..635abb371d4c86677f091551f731047b4ca08612
--- 1/upload-pack.c
--- 2/upload-pack.c
+++ b/upload-pack.c
static int send_ref(const char *refname, const unsigned char *sha1)
{
- static char *capabilities = "multi_ack";
+ static char *capabilities = "multi_ack thin-pack";
struct object *o = parse_object(sha1);
+ if (!o)
+ die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+
if (capabilities)
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
0, capabilities);