Setting PASSWORD_STORE_DIR=. (current directory) causes git commit to fail in subdir
Klaus Rennecke
kzhh.pozfh at rennecke.de
Wed Mar 4 13:25:48 CET 2020
Cause: set_git tries to guess the git top-level folder but fails in
subdir.
Solution: INNER_GIT_DIR=$(git -C "${1%/*}" rev-parse --show-toplevel
2>/dev/null || true)
This will also handle submodules, in a fashion.
Steps to repeat:
$ cd /tmp$ mkdir pass-test$ cd pass-test$ PASSWORD_STORE_DIR=. pass
init **********Password store initialized for **********$ git init
.Initialized empty Git repository in /tmp/pass-test/.git/$ mkdir -p
some/folder$ PASSWORD_STORE_DIR=. pass insert some/folder/testEnter
password for some/folder/test:Retype password for
some/folder/test:fatal: pathspec './some/folder/test.gpg' did not match
any files$ git statusOn branch masterUntracked files: (use "git add
<file>..." to include in what will be committed)
.gpg-id some/
nothing added to commit but untracked files present (use "git add" to
track)$ pass --version=============================================
pass: the standard unix password manager
== == v1.7.3
== ==
Jason A.
Donenfeld == Jason at zx2c4.com ==
==
http://www.passwordstore.org/ ===================================
==========$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20200304/e23e61cd/attachment.html>
More information about the Password-Store
mailing list