From: K Jayatheerth Date: Tue, 18 Aug 2026 16:09:19 GMT Subject: Re: [GSoC Patch 1/7] repo: add path.toplevel with absolute and relative suffix formatting Message-ID: In-Reply-To: <749F5FAC-5803-4E7A-AEC8-BA653D329EE2@gmail.com> Hey Lucas, On Sun, Aug 16, 2026 at 4:37 AM Lucas Seiki Oshiro wrote: > > > > > > +test_expect_success 'path.toplevel absolute and relative' ' > > + test_when_finished "rm -rf repo" && > > + git init repo && > > + ( > > + mkdir -p repo/sub && > > + cd repo/sub && > > + > > + ROOT="$(test-tool path-utils real_path ..)" && > > + > > + echo "path.toplevel.absolute=$ROOT" >expect.abs && > > + git repo info path.toplevel.absolute >actual.abs && > > + test_cmp expect.abs actual.abs && > > + > > + echo "path.toplevel.relative=../" >expect.rel && > > + git repo info path.toplevel.relative >actual.rel && > > + test_cmp expect.rel actual.rel > > + ) > > +' > > Question: why not use `test_repo_info_path` here? test_repo_info_path doesn't quite fit path.toplevel as the helper assumes an $expected_dir suffix and constructs $ROOT/$expected_dir and ../$expected_dir, while toplevel is $ROOT and ../, respectively, therefore I made this case different.