diff options
Diffstat (limited to 'object-file.c')
-rw-r--r-- | object-file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/object-file.c b/object-file.c index 990381abee..f16441afb9 100644 --- a/object-file.c +++ b/object-file.c @@ -767,6 +767,12 @@ struct object_directory *set_temporary_primary_odb(const char *dir, int will_des */ new_odb = xcalloc(1, sizeof(*new_odb)); new_odb->path = xstrdup(dir); + + /* + * Disable ref updates while a temporary odb is active, since + * the objects in the database may roll back. + */ + new_odb->disable_ref_updates = 1; new_odb->will_destroy = will_destroy; new_odb->next = the_repository->objects->odb; the_repository->objects->odb = new_odb; |