|
23 | 23 | #include "commit.h" |
24 | 24 | #include "strvec.h" |
25 | 25 | #include "object-file.h" |
26 | | -#include "object-store-ll.h" |
27 | 26 | #include "path.h" |
28 | 27 | #include "replace-object.h" |
29 | 28 | #include "tmp-objdir.h" |
@@ -268,39 +267,6 @@ void set_git_work_tree(const char *new_work_tree) |
268 | 267 | repo_set_worktree(the_repository, new_work_tree); |
269 | 268 | } |
270 | 269 |
|
271 | | -int odb_mkstemp(struct strbuf *temp_filename, const char *pattern) |
272 | | -{ |
273 | | - int fd; |
274 | | - /* |
275 | | - * we let the umask do its job, don't try to be more |
276 | | - * restrictive except to remove write permission. |
277 | | - */ |
278 | | - int mode = 0444; |
279 | | - git_path_buf(temp_filename, "objects/%s", pattern); |
280 | | - fd = git_mkstemp_mode(temp_filename->buf, mode); |
281 | | - if (0 <= fd) |
282 | | - return fd; |
283 | | - |
284 | | - /* slow path */ |
285 | | - /* some mkstemp implementations erase temp_filename on failure */ |
286 | | - git_path_buf(temp_filename, "objects/%s", pattern); |
287 | | - safe_create_leading_directories(temp_filename->buf); |
288 | | - return xmkstemp_mode(temp_filename->buf, mode); |
289 | | -} |
290 | | - |
291 | | -int odb_pack_keep(const char *name) |
292 | | -{ |
293 | | - int fd; |
294 | | - |
295 | | - fd = open(name, O_RDWR|O_CREAT|O_EXCL, 0600); |
296 | | - if (0 <= fd) |
297 | | - return fd; |
298 | | - |
299 | | - /* slow path */ |
300 | | - safe_create_leading_directories_const(name); |
301 | | - return open(name, O_RDWR|O_CREAT|O_EXCL, 0600); |
302 | | -} |
303 | | - |
304 | 270 | static void set_git_dir_1(const char *path) |
305 | 271 | { |
306 | 272 | xsetenv(GIT_DIR_ENVIRONMENT, path, 1); |
|
0 commit comments