refs: delete pack_refs() in favor of refs_pack_refs()

It only has one caller, not worth keeping just for convenience.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy 2017-03-26 09:42:37 +07:00 committed by Junio C Hamano
parent 2f40e95472
commit 7c744782ab
3 changed files with 1 additions and 7 deletions

View File

@ -17,5 +17,5 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
}; };
if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0)) if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
usage_with_options(pack_refs_usage, opts); usage_with_options(pack_refs_usage, opts);
return pack_refs(flags); return refs_pack_refs(get_main_ref_store(), flags);
} }

5
refs.c
View File

@ -1602,11 +1602,6 @@ int refs_pack_refs(struct ref_store *refs, unsigned int flags)
return refs->be->pack_refs(refs, flags); return refs->be->pack_refs(refs, flags);
} }


int pack_refs(unsigned int flags)
{
return refs_pack_refs(get_main_ref_store(), flags);
}

int refs_peel_ref(struct ref_store *refs, const char *refname, int refs_peel_ref(struct ref_store *refs, const char *refname,
unsigned char *sha1) unsigned char *sha1)
{ {

1
refs.h
View File

@ -297,7 +297,6 @@ void warn_dangling_symrefs(FILE *fp, const char *msg_fmt,
* flags: Combination of the above PACK_REFS_* flags. * flags: Combination of the above PACK_REFS_* flags.
*/ */
int refs_pack_refs(struct ref_store *refs, unsigned int flags); int refs_pack_refs(struct ref_store *refs, unsigned int flags);
int pack_refs(unsigned int flags);


/* /*
* Flags controlling ref_transaction_update(), ref_transaction_create(), etc. * Flags controlling ref_transaction_update(), ref_transaction_create(), etc.