refs: delete pack_refs() in favor of refs_pack_refs()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 26 Mar 2017 02:42:37 +0000 (09:42 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Apr 2017 10:53:25 +0000 (03:53 -0700)
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>
builtin/pack-refs.c
refs.c
refs.h
index 39f9a55d16736d93b43e6aa16a33634039e55de4..b106a392a481570d4fda5a1116c523cde34557ba 100644 (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))
                usage_with_options(pack_refs_usage, opts);
-       return pack_refs(flags);
+       return refs_pack_refs(get_main_ref_store(), flags);
 }
diff --git a/refs.c b/refs.c
index ca1d100551b89f67329a4672ce9d07eec61f4f09..bad05ba8619c65e0143522cdeb220f692a0951bb 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1602,11 +1602,6 @@ int refs_pack_refs(struct ref_store *refs, unsigned int 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,
                  unsigned char *sha1)
 {
diff --git a/refs.h b/refs.h
index 37f4aa8bd549d224b28fd09a2f328f3b2677e684..1a07f9d86fb664191a12aca4f9989734685a2650 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -297,7 +297,6 @@ void warn_dangling_symrefs(FILE *fp, const char *msg_fmt,
  * flags: Combination of the above PACK_REFS_* 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.