| 43 | const char* argv0; |
| 44 | |
| 45 | static void print_usage (std::ostream& out) |
| 46 | { |
| 47 | out << "Usage: " << argv0 << " COMMAND [ARGS ...]" << std::endl; |
| 48 | out << std::endl; |
| 49 | // |--------------------------------------------------------------------------------| 80 characters |
| 50 | out << "Common commands:" << std::endl; |
| 51 | out << " init generate a key and prepare repo to use git-crypt" << std::endl; |
| 52 | out << " status display which files are encrypted" << std::endl; |
| 53 | //out << " refresh ensure all files in the repo are properly decrypted" << std::endl; |
| 54 | out << " lock de-configure git-crypt and re-encrypt files in work tree" << std::endl; |
| 55 | out << std::endl; |
| 56 | out << "GPG commands:" << std::endl; |
| 57 | out << " add-gpg-user USERID add the user with the given GPG user ID as a collaborator" << std::endl; |
| 58 | //out << " rm-gpg-user USERID revoke collaborator status from the given GPG user ID" << std::endl; |
| 59 | //out << " ls-gpg-users list the GPG key IDs of collaborators" << std::endl; |
| 60 | out << " unlock decrypt this repo using the in-repo GPG-encrypted key" << std::endl; |
| 61 | out << std::endl; |
| 62 | out << "Symmetric key commands:" << std::endl; |
| 63 | out << " export-key FILE export this repo's symmetric key to the given file" << std::endl; |
| 64 | out << " unlock KEYFILE decrypt this repo using the given symmetric key" << std::endl; |
| 65 | out << std::endl; |
| 66 | out << "Legacy commands:" << std::endl; |
| 67 | out << " init KEYFILE alias for 'unlock KEYFILE'" << std::endl; |
| 68 | out << " keygen KEYFILE generate a git-crypt key in the given file" << std::endl; |
| 69 | out << " migrate-key OLD NEW migrate the legacy key file OLD to the new format in NEW" << std::endl; |
| 70 | /* |
| 71 | out << std::endl; |
| 72 | out << "Plumbing commands (not to be used directly):" << std::endl; |
| 73 | out << " clean [LEGACY-KEYFILE]" << std::endl; |
| 74 | out << " smudge [LEGACY-KEYFILE]" << std::endl; |
| 75 | out << " diff [LEGACY-KEYFILE] FILE" << std::endl; |
| 76 | */ |
| 77 | out << std::endl; |
| 78 | out << "See 'git-crypt help COMMAND' for more information on a specific command." << std::endl; |
| 79 | } |
| 80 | |
| 81 | static void print_version (std::ostream& out) |
| 82 | { |