Add "do not edit" comment to .git-crypt/.gitattributes file

This commit is contained in:
Andrew Ayer
2015-02-09 11:37:50 -08:00
parent 99d4408f9e
commit 012d78e1fe

View File

@@ -1069,6 +1069,9 @@ int add_gpg_user (int argc, const char** argv)
const std::string state_gitattributes_path(state_path + "/.gitattributes");
if (access(state_gitattributes_path.c_str(), F_OK) != 0) {
std::ofstream state_gitattributes_file(state_gitattributes_path.c_str());
// |--------------------------------------------------------------------------------| 80 chars
state_gitattributes_file << "# Do not edit this file. To specify the files to encrypt, create your own\";
state_gitattributes_file << "# .gitattributes file in the directory where your files are.\n";
state_gitattributes_file << "* !filter !diff\n";
state_gitattributes_file.close();
if (!state_gitattributes_file) {