[pass] list of passwords with its age

Grégoire Détrez gregoire at fripost.org
Fri May 20 11:33:34 CEST 2016


On Fri, May 20, 2016 at 10:45:46AM +0200, Evgenii Sovetkin wrote:
> I want to obtain a sorted list of my passwords together with its age
> (number of days since the last change).
> 
> With git it seems the following loop will do part of the job:
> 
> git ls-tree -r --name-only HEAD | while read filename
> do
>     echo "$(git log -1 --format="%ad" --date=relative -- $filename) $filename"
> done
> 
> Unfortunately, if I rename a password (or even rerun git init) then it
> would seem that I have changed the passwords, though I have not...
> 
> Is there a neater solution one have in mind? Is there a way in git to
> show time passed from the *significant* content change, not simply the
> latest commit?

You could use use git-blame to get the last commit that changed the
first line of each file, something like:

    git blame -L 1,1 $filename --porcelain | sed -n 's/^committer-time //p'


/ǵ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160520/93d6132e/attachment.asc>


More information about the Password-Store mailing list