Merge branch 'pc/lockfile-pid' into seen

Allow recording process ID of the process that holds the lock next
to a lockfile for diagnosis.

* pc/lockfile-pid:
  lockfile: add PID file for debugging stale locks
This commit is contained in:
Junio C Hamano
2025-12-18 16:36:36 +09:00
29 changed files with 546 additions and 75 deletions

View File

@@ -540,7 +540,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
path = repo_git_path(the_repository, "next-index-%"PRIuMAX,
(uintmax_t) getpid());
hold_lock_file_for_update(&false_lock, path,
LOCK_DIE_ON_ERROR);
LOCK_DIE_ON_ERROR, LOCKFILE_PID_OTHER);
create_base_index(current_head);
add_remove_files(&partial);