From ef2d5547fa342197befd4be599438d7a7fa41e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C3=85gren?= Date: Sun, 27 Sep 2020 15:15:44 +0200 Subject: worktree: inline `worktree_ref()` into its only caller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have `strbuf_worktree_ref()`, which works on a strbuf, and a wrapper for it, `worktree_ref()` which returns a string. We even make this wrapper available through worktree.h. But it only has a single caller, sitting right next to it in worktree.c. Just inline the wrapper into its only caller. This means the caller can quite naturally reuse a single strbuf. We currently achieve something similar by having a static strbuf in the wrapper. Signed-off-by: Martin Ă…gren Signed-off-by: Junio C Hamano --- worktree.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'worktree.h') diff --git a/worktree.h b/worktree.h index 516744c433..1449b6bf5d 100644 --- a/worktree.h +++ b/worktree.h @@ -136,11 +136,4 @@ void strbuf_worktree_ref(const struct worktree *wt, struct strbuf *sb, const char *refname); -/* - * Return a refname suitable for access from the current ref - * store. The result will be destroyed at the next call. - */ -const char *worktree_ref(const struct worktree *wt, - const char *refname); - #endif -- cgit v1.2.3