We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f70f056 commit 6e578a3Copy full SHA for 6e578a3
refs.c
@@ -2309,16 +2309,13 @@ int commit_packed_refs(void)
2309
if (!packed_ref_cache->lock)
2310
die("internal error: packed-refs not locked");
2311
2312
- out = fdopen(packed_ref_cache->lock->fd, "w");
+ out = fdopen_lock_file(packed_ref_cache->lock, "w");
2313
if (!out)
2314
die_errno("unable to fdopen packed-refs descriptor");
2315
2316
fprintf_or_die(out, "%s", PACKED_REFS_HEADER);
2317
do_for_each_entry_in_dir(get_packed_ref_dir(packed_ref_cache),
2318
0, write_packed_entry_fn, out);
2319
- if (fclose(out))
2320
- die_errno("write error");
2321
- packed_ref_cache->lock->fd = -1;
2322
2323
if (commit_lock_file(packed_ref_cache->lock)) {
2324
save_errno = errno;
0 commit comments