]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tempfile: stop using the_repository
authorRené Scharfe <l.s.r@web.de>
Tue, 14 Jul 2026 17:59:55 +0000 (19:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Jul 2026 19:54:25 +0000 (12:54 -0700)
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>
tempfile.c
tempfile.h

index 3132eb437100360531fbe1555c8d83defd371bd1..dc9ca4e6459c645ee95cad0251b3133855a83c7c 100644 (file)
@@ -42,8 +42,6 @@
  * file created by its parent.
  */
 
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "abspath.h"
 #include "path.h"
@@ -134,11 +132,6 @@ static void deactivate_tempfile(struct tempfile *tempfile)
 }
 
 /* Make sure errno contains a meaningful value on error */
-struct tempfile *create_tempfile_mode(const char *path, int mode)
-{
-       return repo_create_tempfile_mode(the_repository, path, mode);
-}
-
 struct tempfile *repo_create_tempfile_mode(struct repository *r,
                                           const char *path, int mode)
 {
index 2d17e4dad3faa525baba6231d2d791f77dd09ce7..f571f3c609c04a3953cb86a8b2a18a8179339f8d 100644 (file)
@@ -94,16 +94,9 @@ struct tempfile {
  * `core.sharedRepository`, so it is not guaranteed to have the given
  * mode.
  */
-struct tempfile *create_tempfile_mode(const char *path, int mode);
-
 struct tempfile *repo_create_tempfile_mode(struct repository *r,
                                           const char *path, int mode);
 
-static inline struct tempfile *create_tempfile(const char *path)
-{
-       return create_tempfile_mode(path, 0666);
-}
-
 static inline struct tempfile *repo_create_tempfile(struct repository *r,
                                                    const char *path)
 {