`git` command jailing and symlinked directories don't work together
On my system I have the rua-related directories (i.e. ~/.config/rua/, ~/.cache/rua/ and ~/.local/share/rua/) symlinked to a different partition. This is primarily due to space constraints on /home/, but I've included the ~/.config/rua for consistency's sake. This has worked in the past, but broke with the recently introduced jailing of git-commands. Now whenever rua would normally display a diff of the package content to install/upgrade/etc. it panics instead:
$ cargo r --release -- upgrade
Finished release [optimized] target(s) in 0.11s
Running `target/release/rua upgrade`
<package table omitted>
Do you wish to upgrade them? [O]=ok, [X]=exit. o
And the following AUR packages will need to be built and installed:
<package list omitted>
Proceed? [O]=ok, Ctrl-C=abort. o
thread 'main' panicked at src/git_utils.rs:68:5:
Command git fetch -q upstream failed with exit code Some(128)
Stderr: fatal: not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Stdout:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Similarly, during install (random popular package chosen):
$ cargo r --release -- install octopi
Finished release [optimized] target(s) in 0.12s
Running `target/release/rua install octopi`
Package octopi depends on alpm_octopi_utils. Resolving...
In order to install all targets, the following pacman packages will need to be installed:
qtermwidget
vala
And the following AUR packages will need to be built and installed:
alpm_octopi_utils
octopi
Proceed? [O]=ok, Ctrl-C=abort. o
thread 'main' panicked at src/git_utils.rs:68:5:
Command git remote add upstream https://aur.archlinux.org/alpm_octopi_utils.git failed with exit code Some(128)
Stderr: fatal: not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Stdout:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
When locally reverting the git-jailing commits the error goes away.
I understand that this is a somewhat unusual setup. But given that this has worked in the past, is there anything that can be done about this?
~~I'm a Crostini (Linux on ChromeOS) user; git jailing is also yielding the same error for me. I don't have many specifics about the internals of how Crostini sets things up, like the filesystem, though.~~
Edit, realized it has nothing to do with Crostini and it's actually that I also symlink. In my case, it's not on a separate partition; .config is a symlink to ~/dotfiles/config, where dotfiles keeps all my config files tracked with Git, which I don't think is an uncommon setup at all.