[PATCH] Mult-repo support via submodules

Brian Candler b.candler at pobox.com
Sat Nov 26 11:11:01 CET 2016


On 26/11/2016 06:47, Lance R. Vick wrote:
> This change makes `pass` commit to the innermost Git repository (as
> identified by the presence of a `.git` file/folder) that contains a
> file, when it is changed.

I strongly support this feature, and many thanks for preparing the 
patch. It applies cleanly to master.

The way I would prefer to use this is when the top level is *not* a git 
repo - i.e. ~/.password-store is just a shell directory, and inside this 
are separate git checkouts (or symlinks to the git checkouts, which is 
how I'm testing this now).  I'm just trying to avoid the complexity of 
another (unwarranted) git repo with .gitmodule cruft in it, and 
unnecessary commits.

I realise the following isn't going to work:

     pass git submodule add git at github.com:project/passdb.git Project

but I am quite happy to do:

     cd ~/.password-store; git clone git at github.com:project/passdb.git 
Project

or:

     cd ~/.password-store; ln -s ../git/passdb Project

Quick testing shows:

- the functionality of reading passwords is fine:

pass   # lists all passwords

pass foo   # lists all passwords under foo only

pass foo/bar   # lists all passwords under foo/bar only

pass -c foo/bar/baz   # gets the password to clipboard

- "pass git pull" fails because the top level is not a git repo. That's 
fine (although ideally it would recurse and git pull each repo)

I guess that's my fault for not having a top-level repo, which would let 
me do: pass git submodule foreach "git pull"

- "pass git pull foo" fails with the same error (ideally it would cd 
into foo and "git pull")


Finally, if this is committed, will similar changes need to be made to 
qtpass? Or does qtpass just invoke the 'pass' script under the hood?

Regards,

Brian.



More information about the Password-Store mailing list