brandon1024 / gitchat

:speech_balloon: A Git-Based Command-Line Messaging Application
5 stars 0 forks source link

git-chat-message: sharing files #85

Open brandon1024 opened 3 years ago

brandon1024 commented 3 years ago

If you wanted to share files in git-chat, you would need to encrypt the file yourself, or use git-chat-message -f <file>. This is a bit cluncky, because if you were to git-chat-read the messages, you could get blasted with raw binary data if the file is stored in the commit message.

Instead, we should introduce a new option for including messages with arbitrary files. Here's what I'm thinking:

usage: git chat message [--share-file <file>]

When the --share-file option is used, the file will be encrypted (not in ascii armor) and committed to the repository. The -m and -f options can still be used to compose a message that will included with the file.

When reading messages with git-chat-read, the output should include information on how to read the file.

brandon1024 commented 3 years ago

I originally wanted to store file information (filename, etc) as an additional commit header, but it doesn't look like there's great support for this. Another approach might be through git notes, which are simple refs attached to commits.