]> git.ipfire.org Git - thirdparty/git.git/blame - clone-pack.c
[PATCH] Expose object ID computation functions.
[thirdparty/git.git] / clone-pack.c
Content-type: text/html ]> git.ipfire.org Git - thirdparty/git.git/blame - clone-pack.c


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 85.
CommitLineData
1fcc8ea5
LT
1#include "cache.h"
2#include "refs.h"
3#include "pkt-line.h"
4#include <sys/wait.h>
5
6static const char clone_pack_usage[] = "git-clone-pack [host:]directory [heads]*";
7static const char *exec = "git-upload-pack";
8
9struct ref {
10 struct ref *next;
11 unsigned char sha1[20];
12 char name[0];
13};
14
dd7ba8b4 15static struct ref *get_remote_refs(int fd, int nr_match, char **match)
1fcc8ea5
LT
16{
17 struct ref *ref_list = NULL, **next_ref = &ref_list;
18
19 for (;;) {
20 static char line[1000];
21 unsigned char sha1[20];
22 struct ref *ref;
23 char *refname;
24 int len;
25
26 len = packet_read_line(fd, line, sizeof(line));
27 if (!len)
28 break;
29 if (line[len-1] == '\n')
30 line[--len] = 0;
31 if (len < 42 || get_sha1_hex(line, sha1))
32