}
}
-static struct lock_file packed;
+static struct lock_file packlock;
int pack_refs(unsigned int flags)
{
memset(&cbdata, 0, sizeof(cbdata));
cbdata.flags = flags;
- fd = hold_lock_file_for_update(&packed, git_path("packed-refs"),
+ fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"),
LOCK_DIE_ON_ERROR);
cbdata.refs_file = fdopen(fd, "w");
if (!cbdata.refs_file)
* assign -1 to the lock file descriptor so that commit_lock_file()
* won't try to close() it.
*/
- packed.fd = -1;
- if (commit_lock_file(&packed) < 0)
+ packlock.fd = -1;
+ if (commit_lock_file(&packlock) < 0)
die_errno("unable to overwrite old ref-pack file");
prune_refs(cbdata.ref_to_prune);
return 0;
return 0;
}
-static struct lock_file packlock;
-
static int repack_without_ref(const char *refname)
{
int fd;