mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
odb: get rid of the_repository in odb_mkstemp()
Get rid of our dependency on `the_repository` in `odb_mkstemp()` by passing in the object database as a parameter and adjusting all callers. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
961038856b
commit
1b1679c688
7
odb.h
7
odb.h
@@ -201,12 +201,13 @@ void odb_clear(struct object_database *o);
|
||||
struct odb_source *odb_find_source(struct object_database *odb, const char *obj_dir);
|
||||
|
||||
/*
|
||||
* Create a temporary file rooted in the object database directory, or
|
||||
* die on failure. The filename is taken from "pattern", which should have the
|
||||
* Create a temporary file rooted in the primary alternate's directory, or die
|
||||
* on failure. The filename is taken from "pattern", which should have the
|
||||
* usual "XXXXXX" trailer, and the resulting filename is written into the
|
||||
* "template" buffer. Returns the open descriptor.
|
||||
*/
|
||||
int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
|
||||
int odb_mkstemp(struct object_database *odb,
|
||||
struct strbuf *temp_filename, const char *pattern);
|
||||
|
||||
void *repo_read_object_file(struct repository *r,
|
||||
const struct object_id *oid,
|
||||
|
||||
Reference in New Issue
Block a user