Re: [PATCH 5/5] path.c: don't call the match function without value in trie_find()

2019-10-23 Thread SZEDER Gábor
On Wed, Oct 23, 2019 at 01:01:00PM +0900, Junio C Hamano wrote: > SZEDER Gábor writes: > > >> - b9317d55a3 added two new keys to the trie: 'logs/refs/rewritten' > >> and 'logs/refs/worktree', next to the already existing > >> 'logs/refs/bisect'. This resulted in a trie node with the pa

Re: [PATCH 5/5] path.c: don't call the match function without value in trie_find()

2019-10-22 Thread Junio C Hamano
SZEDER Gábor writes: >> - b9317d55a3 added two new keys to the trie: 'logs/refs/rewritten' >> and 'logs/refs/worktree', next to the already existing >> 'logs/refs/bisect'. This resulted in a trie node with the path >> 'logs/refs', which didn't exist before, and which doesn't have a

Re: [PATCH 5/5] path.c: don't call the match function without value in trie_find()

2019-10-21 Thread SZEDER Gábor
On Mon, Oct 21, 2019 at 06:00:43PM +0200, SZEDER Gábor wrote: > 'logs/refs' is not a working tree-specific path, but since commit > b9317d55a3 (Make sure refs/rewritten/ is per-worktree, 2019-03-07) > 'git rev-parse --git-path' has been returning a bogus path if a > trailing '/' is present: > >

Re: [PATCH 5/5] path.c: don't call the match function without value in trie_find()

2019-10-21 Thread David Turner
On Mon, 2019-10-21 at 18:00 +0200, SZEDER Gábor wrote: > Add the missing condition to trie_find() so it will never invoke the > match function with a non-existing value. check_common() will then > no > longer have to check that it got a non-NULL value, so remove that > condition. ... > > /

[PATCH 5/5] path.c: don't call the match function without value in trie_find()

2019-10-21 Thread SZEDER Gábor
'logs/refs' is not a working tree-specific path, but since commit b9317d55a3 (Make sure refs/rewritten/ is per-worktree, 2019-03-07) 'git rev-parse --git-path' has been returning a bogus path if a trailing '/' is present: $ git -C WT/ rev-parse --git-path logs/refs --git-path logs/refs/ /home/