]> Sergey Matveev's repositories - public-inbox.git/commit
script/public-inbox-*: favor caller-provided pathnames
authorEric Wong <e@80x24.org>
Sun, 20 Dec 2020 06:30:11 +0000 (06:30 +0000)
committerEric Wong <e@80x24.org>
Sun, 20 Dec 2020 20:39:09 +0000 (20:39 +0000)
commit9fcce78e40b0a7c61797be2aff6c5afeb474568e
tree7fe8d8d4748c74cb332f76aa44746ade6959e913
parentf1f61f2e7ab16fdf4441e12b4c3cfb98d7e3e3c5
script/public-inbox-*: favor caller-provided pathnames

We'll try to avoid calling Cwd::abs_path and use
File::Spec->rel2abs instead, since abs_path will resolve
symlinks the user specified on the command-line.

Unfortunately, ->rel2abs still leaves "/.." and "/../"
uncollapsed, so we still need to fall back to Cwd::abs_path in
those cases.

While we are at it, we'll also resolve inboxdir from deep inside
v2 directories instead of misdetecting them as v1 bare git
repos.

In any case, stop matching directories by name and instead rely
on the unique combination of st_dev + st_ino on stat() as we
started doing in the extindex code.
lib/PublicInbox/Admin.pm
script/public-inbox-convert
script/public-inbox-init
t/admin.t