]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit-graph.c
t3905: remove nested git in command substitution
[thirdparty/git.git] / commit-graph.c
index e9124d4a4123b96a644a57816999afe76f24a804..b8c1b034a47f5c71dbf6762008f735035427915d 100644 (file)
@@ -1458,7 +1458,7 @@ static int add_ref_to_set(const char *refname,
        struct object_id peeled;
        struct refs_cb_data *data = (struct refs_cb_data *)cb_data;
 
-       if (!peel_ref(refname, &peeled))
+       if (!peel_iterated_oid(oid, &peeled))
                oid = &peeled;
        if (oid_object_info(the_repository, oid, NULL) == OBJ_COMMIT)
                oidset_insert(data->commits, oid);
@@ -1694,8 +1694,8 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
        } else {
                hold_lock_file_for_update_mode(&lk, ctx->graph_name,
                                               LOCK_DIE_ON_ERROR, 0444);
-               fd = lk.tempfile->fd;
-               f = hashfd(lk.tempfile->fd, lk.tempfile->filename.buf);
+               fd = get_lock_file_fd(&lk);
+               f = hashfd(fd, get_lock_file_path(&lk));
        }
 
        chunks[0].id = GRAPH_CHUNKID_OIDFANOUT;
@@ -1833,7 +1833,7 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
                result = rename(ctx->graph_name, final_graph_name);
 
                for (i = 0; i < ctx->num_commit_graphs_after; i++)
-                       fprintf(lk.tempfile->fp, "%s\n", ctx->commit_graph_hash_after[i]);
+                       fprintf(get_lock_file_fp(&lk), "%s\n", ctx->commit_graph_hash_after[i]);
 
                if (result) {
                        error(_("failed to rename temporary commit-graph file"));