mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01: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
@@ -278,7 +278,8 @@ static char *find_temp_filename(void)
|
||||
* Find a temporary filename that is available. This is briefly
|
||||
* racy, but unlikely to collide.
|
||||
*/
|
||||
fd = odb_mkstemp(&name, "bundles/tmp_uri_XXXXXX");
|
||||
fd = odb_mkstemp(the_repository->objects, &name,
|
||||
"bundles/tmp_uri_XXXXXX");
|
||||
if (fd < 0) {
|
||||
warning(_("failed to create temporary file"));
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user