tempfile: stop using the_repository

Remove the compatibility wrappers create_tempfile_mode() and create_tempfile() that have become unused. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Jul 14, 2026 at 19:59 UTC 75e05f6bc3b3e04301d25327f54b2c9998471c1d
2 files changed -14
tempfile.c
-7
@@ -42,8 +42,6 @@
42 * file created by its parent.
43 */
44
45 -#define USE_THE_REPOSITORY_VARIABLE
46 -
45 #include "git-compat-util.h"
46 #include "abspath.h"
47 #include "path.h"
@@ -134,11 +132,6 @@ static void deactivate_tempfile(struct tempfile *tempfile)
132 }
133
134 /* Make sure errno contains a meaningful value on error */
137 -struct tempfile *create_tempfile_mode(const char *path, int mode)
138 -{
139 - return repo_create_tempfile_mode(the_repository, path, mode);
140 -}
141 -
135 struct tempfile *repo_create_tempfile_mode(struct repository *r,
136 const char *path, int mode)
137 {
tempfile.h
-7
@@ -94,16 +94,9 @@ struct tempfile {
94 * `core.sharedRepository`, so it is not guaranteed to have the given
95 * mode.
96 */
97 -struct tempfile *create_tempfile_mode(const char *path, int mode);
98 -
97 struct tempfile *repo_create_tempfile_mode(struct repository *r,
98 const char *path, int mode);
99
102 -static inline struct tempfile *create_tempfile(const char *path)
103 -{
104 - return create_tempfile_mode(path, 0666);
105 -}
106 -
100 static inline struct tempfile *repo_create_tempfile(struct repository *r,
101 const char *path)
102 {