Merge branch 'maint'
* maint: t5550: repack everything into one file Catch invalid --depth option passed to clone or fetch
This commit is contained in:
commit
247f9d23da
@ -162,8 +162,7 @@ test_expect_success 'http remote detects correct HEAD' '
|
|||||||
test_expect_success 'fetch packed objects' '
|
test_expect_success 'fetch packed objects' '
|
||||||
cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
|
cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
|
||||||
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
|
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
|
||||||
git --bare repack &&
|
git --bare repack -a -d
|
||||||
git --bare prune-packed
|
|
||||||
) &&
|
) &&
|
||||||
git clone $HTTPD_URL/dumb/repo_pack.git
|
git clone $HTTPD_URL/dumb/repo_pack.git
|
||||||
'
|
'
|
||||||
|
@ -474,8 +474,12 @@ static int set_git_option(struct git_transport_options *opts,
|
|||||||
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
|
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
|
||||||
if (!value)
|
if (!value)
|
||||||
opts->depth = 0;
|
opts->depth = 0;
|
||||||
else
|
else {
|
||||||
opts->depth = atoi(value);
|
char *end;
|
||||||
|
opts->depth = strtol(value, &end, 0);
|
||||||
|
if (*end)
|
||||||
|
die("transport: invalid depth option '%s'", value);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user