aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/gc.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:17 -0800
committerJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:17 -0800
commit58e2ce9112446935a1294d095a07390ed665a6bc (patch)
tree9ea2ea6bae6a513e3e3ac9925e2149fd501be379 /builtin/gc.c
parent2856089e367cc126f70d0a3d6d6ff5290d204f2e (diff)
parent6a8c89d053059b97adb846fce1d22f6d7704c56a (diff)
downloadgit-58e2ce9112446935a1294d095a07390ed665a6bc.tar.gz
Merge branch 'ma/more-opaque-lock-file'
Code clean-up. * ma/more-opaque-lock-file: read-cache: try not to peek into `struct {lock_,temp}file` refs/files-backend: don't peek into `struct lock_file` midx: don't peek into `struct lock_file` commit-graph: don't peek into `struct lock_file` builtin/gc: don't peek into `struct lock_file`
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index b315b2ad58..fe35b10fe9 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);
@@ -1953,11 +1953,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);