mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'ps/object-store'
Code clean-up around object access API.
* ps/object-store:
odb: rename `read_object_with_reference()`
odb: rename `pretend_object_file()`
odb: rename `has_object()`
odb: rename `repo_read_object_file()`
odb: rename `oid_object_info()`
odb: trivial refactorings to get rid of `the_repository`
odb: get rid of `the_repository` when handling submodule sources
odb: get rid of `the_repository` when handling the primary source
odb: get rid of `the_repository` in `for_each()` functions
odb: get rid of `the_repository` when handling alternates
odb: get rid of `the_repository` in `odb_mkstemp()`
odb: get rid of `the_repository` in `assert_oid_type()`
odb: get rid of `the_repository` in `find_odb()`
odb: introduce parent pointers
object-store: rename files to "odb.{c,h}"
object-store: rename `object_directory` to `odb_source`
object-store: rename `raw_object_store` to `object_database`
This commit is contained in:
7
refs.c
7
refs.c
@@ -19,7 +19,7 @@
|
||||
#include "run-command.h"
|
||||
#include "hook.h"
|
||||
#include "object-name.h"
|
||||
#include "object-store.h"
|
||||
#include "odb.h"
|
||||
#include "object.h"
|
||||
#include "path.h"
|
||||
#include "submodule.h"
|
||||
@@ -376,7 +376,8 @@ int ref_resolves_to_object(const char *refname,
|
||||
{
|
||||
if (flags & REF_ISBROKEN)
|
||||
return 0;
|
||||
if (!has_object(repo, oid, HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
|
||||
if (!odb_has_object(repo->objects, oid,
|
||||
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
|
||||
error(_("%s does not point to a valid object!"), refname);
|
||||
return 0;
|
||||
}
|
||||
@@ -2477,7 +2478,7 @@ int ref_transaction_prepare(struct ref_transaction *transaction,
|
||||
break;
|
||||
}
|
||||
|
||||
if (refs->repo->objects->odb->disable_ref_updates) {
|
||||
if (refs->repo->objects->sources->disable_ref_updates) {
|
||||
strbuf_addstr(err,
|
||||
_("ref updates forbidden inside quarantine environment"));
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user