diff options
Diffstat (limited to 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index b315b2ad58..4c40594d66 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -92,7 +92,7 @@ static void process_log_file(void) */ int saved_errno = errno; fprintf(stderr, _("Failed to fstat %s: %s"), - get_tempfile_path(log_lock.tempfile), + get_lock_file_path(&log_lock), strerror(saved_errno)); fflush(stderr); commit_lock_file(&log_lock); @@ -301,7 +301,7 @@ static uint64_t estimate_repack_memory(struct packed_git *pack) /* and then obj_hash[], underestimated in fact */ heap += sizeof(struct object *) * nr_objects; /* revindex is used also */ - heap += sizeof(struct revindex_entry) * nr_objects; + heap += (sizeof(off_t) + sizeof(uint32_t)) * nr_objects; /* * read_sha1_file() (either at delta calculation phase, or * writing phase) also fills up the delta base cache @@ -769,7 +769,7 @@ static int dfs_on_ref(const char *refname, struct commit_list *stack = NULL; struct commit *commit; - if (!peel_ref(refname, &peeled)) + if (!peel_iterated_oid(oid, &peeled)) oid = &peeled; if (oid_object_info(the_repository, oid, NULL) != OBJ_COMMIT) return 0; @@ -897,6 +897,12 @@ static int maintenance_task_prefetch(struct maintenance_run_opts *opts) struct string_list_item *item; struct string_list remotes = STRING_LIST_INIT_DUP; + git_config_set_multivar_gently("log.excludedecoration", + "refs/prefetch/", + "refs/prefetch/", + CONFIG_FLAGS_FIXED_VALUE | + CONFIG_FLAGS_MULTI_REPLACE); + if (for_each_remote(append_remote, &remotes)) { error(_("failed to fill remotes")); result = 1; @@ -1953,11 +1959,11 @@ static int update_background_schedule(int enable) return error(_("another process is scheduling background maintenance")); if (!strcmp(scheduler, "launchctl")) - result = launchctl_update_schedule(enable, lk.tempfile->fd, cmd); + result = launchctl_update_schedule(enable, get_lock_file_fd(&lk), cmd); else if (!strcmp(scheduler, "schtasks")) - result = schtasks_update_schedule(enable, lk.tempfile->fd, cmd); + result = schtasks_update_schedule(enable, get_lock_file_fd(&lk), cmd); else if (!strcmp(scheduler, "crontab")) - result = crontab_update_schedule(enable, lk.tempfile->fd, cmd); + result = crontab_update_schedule(enable, get_lock_file_fd(&lk), cmd); else die("unknown background scheduler: %s", scheduler); |