mirror of
https://github.com/git/git.git
synced 2024-05-27 09:56:30 +02:00
ref-filter: drop unused atom parameter from get_worktree_path()
The get_worktree_path() function is used to populate the %(worktreepath)
value, but it has never used its "atom" parameter since it was added in
2582083fa1
(ref-filter: add worktreepath atom, 2019-04-28).
Normally we'd use the atom struct to cache any work we do, but in this
case there's a global hashmap that does that caching already. So we can
just drop the unused parameter.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
06dd2baa8d
commit
fe6258c348
|
@ -1822,7 +1822,7 @@ static void lazy_init_worktree_map(void)
|
||||||
populate_worktree_map(&(ref_to_worktree_map.map), ref_to_worktree_map.worktrees);
|
populate_worktree_map(&(ref_to_worktree_map.map), ref_to_worktree_map.worktrees);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *get_worktree_path(const struct used_atom *atom, const struct ref_array_item *ref)
|
static char *get_worktree_path(const struct ref_array_item *ref)
|
||||||
{
|
{
|
||||||
struct hashmap_entry entry, *e;
|
struct hashmap_entry entry, *e;
|
||||||
struct ref_to_worktree_entry *lookup_result;
|
struct ref_to_worktree_entry *lookup_result;
|
||||||
|
@ -1881,7 +1881,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err)
|
||||||
refname = get_refname(atom, ref);
|
refname = get_refname(atom, ref);
|
||||||
else if (atom_type == ATOM_WORKTREEPATH) {
|
else if (atom_type == ATOM_WORKTREEPATH) {
|
||||||
if (ref->kind == FILTER_REFS_BRANCHES)
|
if (ref->kind == FILTER_REFS_BRANCHES)
|
||||||
v->s = get_worktree_path(atom, ref);
|
v->s = get_worktree_path(ref);
|
||||||
else
|
else
|
||||||
v->s = xstrdup("");
|
v->s = xstrdup("");
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue