diff options
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/upload-pack.c b/upload-pack.c index c989a737f9..38b2a29110 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -758,6 +758,7 @@ static void upload_pack(void) reset_timeout(); head_ref_namespaced(send_ref, &symref); for_each_namespaced_ref(send_ref, &symref); + advertise_shallow_grafts(1); packet_flush(1); } else { head_ref_namespaced(mark_our_ref, NULL); @@ -835,8 +836,9 @@ int main(int argc, char **argv) if (!enter_repo(dir, strict)) die("'%s' does not appear to be a git repository", dir); - if (is_repository_shallow()) - die("attempt to fetch/clone from a shallow repository"); + if (is_repository_shallow() && stateless_rpc) + die("attempt to push into a shallow repository"); + git_config(upload_pack_config, NULL); upload_pack(); return 0; |