Skip to content

Commit 3e1a53d

Browse files
rscharfedscho
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 64055b3 commit 3e1a53d

File tree

6 files changed

+0
-18
lines changed

6 files changed

+0
-18
lines changed

builtin/branch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,6 @@ int cmd_branch(int argc,
884884
string_list_clear(&output, 0);
885885
ref_sorting_release(sorting);
886886
ref_filter_clear(&filter);
887-
ref_format_clear(&format);
888887

889888
ret = 0;
890889
goto out;

builtin/for-each-ref.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ int cmd_for_each_ref(int argc,
108108
filter_and_format_refs(&filter, flags, sorting, &format);
109109

110110
ref_filter_clear(&filter);
111-
ref_format_clear(&format);
112111
ref_sorting_release(sorting);
113112
strvec_clear(&vec);
114113
return 0;

builtin/tag.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,6 @@ int cmd_tag(int argc,
698698
cleanup:
699699
ref_sorting_release(sorting);
700700
ref_filter_clear(&filter);
701-
ref_format_clear(&format);
702701
strbuf_release(&buf);
703702
strbuf_release(&ref);
704703
strbuf_release(&reflog_msg);

builtin/verify-tag.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,5 @@ int cmd_verify_tag(int argc,
6969
if (format.format)
7070
pretty_print_ref(name, &oid, &format);
7171
}
72-
ref_format_clear(&format);
7372
return had_error;
7473
}

ref-filter.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3660,14 +3660,3 @@ void ref_filter_clear(struct ref_filter *filter)
36603660
free_commit_list(filter->unreachable_from);
36613661
ref_filter_init(filter);
36623662
}
3663-
3664-
void ref_format_init(struct ref_format *format)
3665-
{
3666-
struct ref_format blank = REF_FORMAT_INIT;
3667-
memcpy(format, &blank, sizeof(blank));
3668-
}
3669-
3670-
void ref_format_clear(struct ref_format *format)
3671-
{
3672-
ref_format_init(format);
3673-
}

ref-filter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,4 @@ void filter_is_base(struct repository *r,
211211
void ref_filter_init(struct ref_filter *filter);
212212
void ref_filter_clear(struct ref_filter *filter);
213213

214-
void ref_format_init(struct ref_format *format);
215-
void ref_format_clear(struct ref_format *format);
216-
217214
#endif /* REF_FILTER_H */

0 commit comments

Comments
 (0)