-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
#include "cache.h"
#include "commit.h"
-#include <errno.h>
-#include <stdio.h>
#include "pull.h"
static size_t fwrite_sha1_file(void *ptr, size_t eltsize, size_t nmemb,
void *data) {
- char expn[4096];
+ unsigned char expn[4096];
size_t size = eltsize * nmemb;
int posn = 0;
do {
{
char *hex = sha1_to_hex(sha1);
char *filename = sha1_file_name(sha1);
- char real_sha1[20];
+ unsigned char real_sha1[20];
char *url;
char *posn;
get_tree = 1;
} else if (argv[arg][1] == 'c') {
get_history = 1;
+ } else if (argv[arg][1] == 'd') {
+ get_delta = 0;
+ } else if (!strcmp(argv[arg], "--recover")) {
+ get_delta = 2;
} else if (argv[arg][1] == 'a') {
get_all = 1;
get_tree = 1;
arg++;
}
if (argc < arg + 2) {
- usage("git-http-pull [-c] [-t] [-a] [-v] commit-id url");
+ usage("git-http-pull [-c] [-t] [-a] [-d] [-v] [--recover] commit-id url");
return 1;
}
commit_id = argv[arg];