summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-01 20:39:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-01 20:39:51 (GMT)
commit2b4ff3d3dc64d4abcded7caa9bcdf063aea5ec3f (patch)
treed92a6b80a57a024256b1306665e629ae1d4b8185 /builtin/receive-pack.c
parentcc0c732f6ba533ed4ee9f8a29f30628b04dba373 (diff)
parent37b9dcabfc48b0cbce638140279878dac37aec73 (diff)
downloadgit-2b4ff3d3dc64d4abcded7caa9bcdf063aea5ec3f.zip
git-2b4ff3d3dc64d4abcded7caa9bcdf063aea5ec3f.tar.gz
git-2b4ff3d3dc64d4abcded7caa9bcdf063aea5ec3f.tar.bz2
Merge branch 'tb/reset-shallow'
Fix in-core inconsistency after fetching into a shallow repository that broke the code to write out commit-graph. * tb/reset-shallow: shallow.c: use '{commit,rollback}_shallow_file' t5537: use test_write_lines and indented heredocs for readability
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 239094d..a00f91c 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -893,12 +893,12 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
opt.env = tmp_objdir_env(tmp_objdir);
setup_alternate_shallow(&shallow_lock, &opt.shallow_file, &extra);
if (check_connected(command_singleton_iterator, cmd, &opt)) {
- rollback_lock_file(&shallow_lock);
+ rollback_shallow_file(the_repository, &shallow_lock);
oid_array_clear(&extra);
return -1;
}
- commit_lock_file(&shallow_lock);
+ commit_shallow_file(the_repository, &shallow_lock);
/*
* Make sure setup_alternate_shallow() for the next ref does