mirror of
https://github.com/git/git.git
synced 2025-02-06 09:26:16 +00:00
ref-filter: remove ref_format_clear()
Now that ref_format_clear() no longer releases any memory we don't need it anymore. Remove it and its counterpart, ref_format_init(). Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
7ee4fd18ac
commit
c5490ce9d1
@ -884,7 +884,6 @@ int cmd_branch(int argc,
|
||||
string_list_clear(&output, 0);
|
||||
ref_sorting_release(sorting);
|
||||
ref_filter_clear(&filter);
|
||||
ref_format_clear(&format);
|
||||
|
||||
ret = 0;
|
||||
goto out;
|
||||
|
@ -108,7 +108,6 @@ int cmd_for_each_ref(int argc,
|
||||
filter_and_format_refs(&filter, flags, sorting, &format);
|
||||
|
||||
ref_filter_clear(&filter);
|
||||
ref_format_clear(&format);
|
||||
ref_sorting_release(sorting);
|
||||
strvec_clear(&vec);
|
||||
return 0;
|
||||
|
@ -698,7 +698,6 @@ int cmd_tag(int argc,
|
||||
cleanup:
|
||||
ref_sorting_release(sorting);
|
||||
ref_filter_clear(&filter);
|
||||
ref_format_clear(&format);
|
||||
strbuf_release(&buf);
|
||||
strbuf_release(&ref);
|
||||
strbuf_release(&reflog_msg);
|
||||
|
@ -69,6 +69,5 @@ int cmd_verify_tag(int argc,
|
||||
if (format.format)
|
||||
pretty_print_ref(name, &oid, &format);
|
||||
}
|
||||
ref_format_clear(&format);
|
||||
return had_error;
|
||||
}
|
||||
|
11
ref-filter.c
11
ref-filter.c
@ -3660,14 +3660,3 @@ void ref_filter_clear(struct ref_filter *filter)
|
||||
free_commit_list(filter->unreachable_from);
|
||||
ref_filter_init(filter);
|
||||
}
|
||||
|
||||
void ref_format_init(struct ref_format *format)
|
||||
{
|
||||
struct ref_format blank = REF_FORMAT_INIT;
|
||||
memcpy(format, &blank, sizeof(blank));
|
||||
}
|
||||
|
||||
void ref_format_clear(struct ref_format *format)
|
||||
{
|
||||
ref_format_init(format);
|
||||
}
|
||||
|
@ -211,7 +211,4 @@ void filter_is_base(struct repository *r,
|
||||
void ref_filter_init(struct ref_filter *filter);
|
||||
void ref_filter_clear(struct ref_filter *filter);
|
||||
|
||||
void ref_format_init(struct ref_format *format);
|
||||
void ref_format_clear(struct ref_format *format);
|
||||
|
||||
#endif /* REF_FILTER_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user