repack_without_ref(): remove temporary
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
064d51dc40
commit
fe9c7b78c5
7
refs.c
7
refs.c
@ -1278,12 +1278,10 @@ static struct lock_file packlock;
|
|||||||
static int repack_without_ref(const char *refname)
|
static int repack_without_ref(const char *refname)
|
||||||
{
|
{
|
||||||
struct ref_array *packed;
|
struct ref_array *packed;
|
||||||
struct ref_entry *ref;
|
|
||||||
int fd, i;
|
int fd, i;
|
||||||
|
|
||||||
packed = get_packed_refs(get_ref_cache(NULL));
|
packed = get_packed_refs(get_ref_cache(NULL));
|
||||||
ref = search_ref_array(packed, refname);
|
if (search_ref_array(packed, refname) == NULL)
|
||||||
if (ref == NULL)
|
|
||||||
return 0;
|
return 0;
|
||||||
fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
|
fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
@ -1294,8 +1292,7 @@ static int repack_without_ref(const char *refname)
|
|||||||
for (i = 0; i < packed->nr; i++) {
|
for (i = 0; i < packed->nr; i++) {
|
||||||
char line[PATH_MAX + 100];
|
char line[PATH_MAX + 100];
|
||||||
int len;
|
int len;
|
||||||
|
struct ref_entry *ref = packed->refs[i];
|
||||||
ref = packed->refs[i];
|
|
||||||
|
|
||||||
if (!strcmp(refname, ref->name))
|
if (!strcmp(refname, ref->name))
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user