summaryrefslogtreecommitdiff
path: root/worktree.h
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-09-27 13:15:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-27 21:21:47 (GMT)
commitef2d5547fa342197befd4be599438d7a7fa41e04 (patch)
tree6f88de25dfcfe97a81976eeb1f7c99c362524ffc /worktree.h
parent962dd7ebc3e76afc2c896d377c319f8140966303 (diff)
downloadgit-ef2d5547fa342197befd4be599438d7a7fa41e04.zip
git-ef2d5547fa342197befd4be599438d7a7fa41e04.tar.gz
git-ef2d5547fa342197befd4be599438d7a7fa41e04.tar.bz2
worktree: inline `worktree_ref()` into its only caller
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 <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/worktree.h b/worktree.h
index 516744c..1449b6b 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