Skip to content

Commit 7c74478

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2f40e95 commit 7c74478

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

builtin/pack-refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
1717
};
1818
if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
1919
usage_with_options(pack_refs_usage, opts);
20-
return pack_refs(flags);
20+
return refs_pack_refs(get_main_ref_store(), flags);
2121
}

refs.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,11 +1602,6 @@ int refs_pack_refs(struct ref_store *refs, unsigned int flags)
16021602
return refs->be->pack_refs(refs, flags);
16031603
}
16041604

1605-
int pack_refs(unsigned int flags)
1606-
{
1607-
return refs_pack_refs(get_main_ref_store(), flags);
1608-
}
1609-
16101605
int refs_peel_ref(struct ref_store *refs, const char *refname,
16111606
unsigned char *sha1)
16121607
{

refs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ void warn_dangling_symrefs(FILE *fp, const char *msg_fmt,
297297
* flags: Combination of the above PACK_REFS_* flags.
298298
*/
299299
int refs_pack_refs(struct ref_store *refs, unsigned int flags);
300-
int pack_refs(unsigned int flags);
301300

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

0 commit comments

Comments
 (0)