[pass] Don't re-commit edited files with no changes

Hugo Osvaldo Barrera hugo at barrera.io
Tue Sep 23 14:53:06 CEST 2014


On 2014-09-23 08:49, Von Welch wrote:
> I agree with not committing unchanged files. I suspect the best way to
> implement it is to look for a change in the modification timestamp of the
> temporary file.
> 
> Von
> 

But, as I mentioned, one might save the file unchanged (maybe because we just
save without thinking, or maybe because we thought we wrote something different
and did not, etc).

> On Tue, Sep 23, 2014 at 8:47 AM, Hugo Osvaldo Barrera <hugo at barrera.io>
> wrote:
> 
> > I've come across a small issue that can clutter up the log if using a git
> > repository:
> >
> >     $ pass edit somepassword
> >     <save file unchanged, and exit editor>
> >
> > pass will then re-encrypt the file, and since gpg includes a timestamp or
> > something alike, the encrypted files difers from the original one. pass
> > will
> > then add the file and git-commit(1) it, resulting in a commit that did not
> > actually alter the underlying file.
> >
> > pass should compare unencrypted files before re-encrypting and re-commiting
> > changes. This sounds not-so-trivial, but as-is, the log can be polluted
> > with
> > empty changes (and the repository growns needlessly).
> >
> > --
> > Hugo Osvaldo Barrera
> > A: Because we read from top to bottom, left to right.
> > Q: Why should I start my reply below the quoted text?
> >
> > _______________________________________________
> > Password-Store mailing list
> > Password-Store at lists.zx2c4.com
> > http://lists.zx2c4.com/mailman/listinfo/password-store
> >
> >

-- 
Hugo Osvaldo Barrera
A: Because we read from top to bottom, left to right.
Q: Why should I start my reply below the quoted text?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140923/69091823/attachment-0001.asc>


More information about the Password-Store mailing list