提交 0c0c0bd2 编写于 作者: M Michael Haggerty 提交者: Junio C Hamano

pack-refs: rename handle_one_ref() to pack_one_ref()

This code is about to be moved, so name the function more
distinctively.
Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 fec3137f
...@@ -23,7 +23,7 @@ static int do_not_prune(int flags) ...@@ -23,7 +23,7 @@ static int do_not_prune(int flags)
return (flags & (REF_ISSYMREF|REF_ISPACKED)); return (flags & (REF_ISSYMREF|REF_ISPACKED));
} }
static int handle_one_ref(const char *path, const unsigned char *sha1, static int pack_one_ref(const char *path, const unsigned char *sha1,
int flags, void *cb_data) int flags, void *cb_data)
{ {
struct pack_refs_cb_data *cb = cb_data; struct pack_refs_cb_data *cb = cb_data;
...@@ -130,7 +130,7 @@ int pack_refs(unsigned int flags) ...@@ -130,7 +130,7 @@ int pack_refs(unsigned int flags)
/* perhaps other traits later as well */ /* perhaps other traits later as well */
fprintf(cbdata.refs_file, "# pack-refs with: peeled fully-peeled \n"); fprintf(cbdata.refs_file, "# pack-refs with: peeled fully-peeled \n");
for_each_ref(handle_one_ref, &cbdata); for_each_ref(pack_one_ref, &cbdata);
if (ferror(cbdata.refs_file)) if (ferror(cbdata.refs_file))
die("failed to write ref-pack file"); die("failed to write ref-pack file");
if (fflush(cbdata.refs_file) || fsync(fd) || fclose(cbdata.refs_file)) if (fflush(cbdata.refs_file) || fsync(fd) || fclose(cbdata.refs_file))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册