elasticdog / transcrypt

transparently encrypt files within a git repository
MIT License
1.43k stars 102 forks source link

be verbose when you say the repo is dirty #157

Closed andreineculau closed 1 year ago

andreineculau commented 1 year ago

useful for those less knowledged or in CI flows

jmurty commented 1 year ago

I like the idea here @andreineculau but the output from git diff-index HEAD -- isn't very user friendly, e.g:

:100755 100755 8217bfddbf441278e55c1416eca90a6d7ea3afe4 0000000000000000000000000000000000000000 M      transcrypt

I'm trying some other options to get nicer formatting

jmurty commented 1 year ago

I've tweaked your approach in b8b564e1 to print an easier to understand listing of dirty files, e.g:

transcrypt: the repo is dirty; commit or stash your changes before running transcrypt

M       CHANGELOG.md

Thanks for the inspiration @andreineculau!

andreineculau commented 1 year ago

Great stuff! Thanks!

I don't remember the background but I believe the "nicer" printouts might be hiding info (corner-cases), that's why I went with the basix printout. This is 2? years ago, git has improved, I don't remember the details 🤷