diff options
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r-- | builtin/receive-pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 67ce1ef105..cc8c34f021 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -178,6 +178,8 @@ static void write_head_info(void) if (!sent_capabilities) show_ref("capabilities^{}", null_sha1); + advertise_shallow_grafts(1); + /* EOF */ packet_flush(1); } @@ -998,7 +1000,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) if (!enter_repo(dir, 0)) die("'%s' does not appear to be a git repository", dir); - if (is_repository_shallow()) + if (is_repository_shallow() && stateless_rpc) die("attempt to push into a shallow repository"); git_config(receive_pack_config, NULL); |