summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2026-07-14 19:59:56 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-14 12:54:25 -0700
commit2e486bfbf75c5098406a07e6967ecb80a28c316a (patch)
tree952c2f6cd8791f4e6efe1facb904da2b0dfcb0ca /commit-graph.c
parent75e05f6bc3b3e04301d25327f54b2c9998471c1d (diff)
use repo_hold_lock_file_for_update{,_mode,_timeout}() with custom repos
Apply the config setting core.sharedRepository from the repository at hand instead of from the_repository. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 801471a098..063b545eb7 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2122,8 +2122,8 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
if (ctx->split) {
char *lock_name = get_commit_graph_chain_filename(ctx->odb_source);
- hold_lock_file_for_update_mode(&lk, lock_name,
- LOCK_DIE_ON_ERROR, 0444);
+ repo_hold_lock_file_for_update_mode(ctx->r, &lk, lock_name,
+ LOCK_DIE_ON_ERROR, 0444);
free(lock_name);
graph_layer = mks_tempfile_m(ctx->graph_name, 0444);
@@ -2141,8 +2141,9 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
f = hashfd(ctx->r->hash_algo,
get_tempfile_fd(graph_layer), get_tempfile_path(graph_layer));
} else {
- hold_lock_file_for_update_mode(&lk, ctx->graph_name,
- LOCK_DIE_ON_ERROR, 0444);
+ repo_hold_lock_file_for_update_mode(ctx->r, &lk,
+ ctx->graph_name,
+ LOCK_DIE_ON_ERROR, 0444);
f = hashfd(ctx->r->hash_algo,
get_lock_file_fd(&lk), get_lock_file_path(&lk));
}