1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 09:36:10 +02:00

shallow repository: disable unsupported operations for now.

We currently do not support fetching/cloning from a shallow repository
nor pushing into one.  Make sure these are not attempted so that we
do not have to worry about corrupting repositories needlessly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2007-01-21 22:23:58 -08:00
parent f43117a6c1
commit a0022eebf3
2 changed files with 5 additions and 1 deletions

View File

@ -421,6 +421,9 @@ int main(int argc, char **argv)
if (!enter_repo(dir, 0))
die("'%s': unable to chdir or not a git archive", dir);
if (is_repository_shallow())
die("attempt to push into a shallow repository");
setup_ident();
/* don't die if gecos is empty */
ignore_missing_committer_name();

View File

@ -672,7 +672,8 @@ int main(int argc, char **argv)
if (!enter_repo(dir, strict))
die("'%s': unable to chdir or not a git archive", dir);
if (is_repository_shallow())
die("attempt to fetch/clone from a shallow repository");
upload_pack();
return 0;
}