summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-02-20 14:55:28 -0500
committerJunio C Hamano <gitster@pobox.com>2013-02-20 13:42:21 -0800
commit97a83fa839d818130bfeca060279c4c355036785 (patch)
tree9b6f16af4329b1be0fdb3c6d513bafac19dbee9c /upload-pack.c
parente58e57e49eb990e38df19628a744c71b44397ef1 (diff)
downloadgit-97a83fa839d818130bfeca060279c4c355036785.tar.gz
upload-pack: remove packet debugging harness
If you set the GIT_DEBUG_SEND_PACK environment variable, upload-pack will dump lines it receives in the receive_needs phase to a descriptor. This debugging harness is a strict subset of what GIT_TRACE_PACKET can do. Let's just drop it in favor of that. A few tests used GIT_DEBUG_SEND_PACK to confirm which objects get sent; we have to adapt them to the new output format. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/upload-pack.c b/upload-pack.c
index bd6f25519c..0edc79e4a4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -42,7 +42,6 @@ static unsigned int timeout;
* otherwise maximum packet size (up to 65520 bytes).
*/
static int use_sideband;
-static int debug_fd;
static int advertise_refs;
static int stateless_rpc;
@@ -580,8 +579,6 @@ static void receive_needs(void)
int has_non_tip = 0;
shallow_nr = 0;
- if (debug_fd)
- write_str_in_full(debug_fd, "#S\n");
for (;;) {
struct object *o;
const char *features;
@@ -590,8 +587,6 @@ static void receive_needs(void)
reset_timeout();
if (!len)
break;
- if (debug_fd)
- write_in_full(debug_fd, line, len);
if (!prefixcmp(line, "shallow ")) {
unsigned char sha1[20];
@@ -653,8 +648,6 @@ static void receive_needs(void)
add_object_array(o, NULL, &want_obj);
}
}
- if (debug_fd)
- write_str_in_full(debug_fd, "#E\n");
/*
* We have sent all our refs already, and the other end
@@ -845,8 +838,6 @@ int main(int argc, char **argv)
if (is_repository_shallow())
die("attempt to fetch/clone from a shallow repository");
git_config(upload_pack_config, NULL);
- if (getenv("GIT_DEBUG_SEND_PACK"))
- debug_fd = atoi(getenv("GIT_DEBUG_SEND_PACK"));
upload_pack();
return 0;
}