diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-03 21:06:57 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-03 21:06:57 +0200 |
commit | 1c73153836ff8ce53ab251e1f0e7f2b2ded47e75 (patch) | |
tree | 44f34da8ec12c43f3cfe3c4592a5c3cd4a9d3e0f | |
parent | 55c7189751df130337fd056e85ddb131b80e389c (diff) |
adding files to git in native mode
-rw-r--r-- | mainwindow.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index a299a4f2..40428513 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -641,6 +641,15 @@ void MainWindow::setPassword(QString file, bool overwrite) } QString force(overwrite ? " --yes " : " "); executeWrapper(gpgExecutable , force + "--batch -eq --output \"" + file + "\" " + recipients + " -", newValue); + if (!useWebDav) { + if (!overwrite) { + executeWrapper(gitExecutable, "add " + file); + } + QString path = file; + path.replace(QRegExp("\\.gpg$"), ""); + path.replace(QRegExp("^" + passStore), ""); + executeWrapper(gitExecutable, "commit " + file + " -m \"" + (overwrite ? "Edit" : "Add") + " for " + path + " using QtPass\""); + } } } @@ -788,8 +797,13 @@ void MainWindow::on_usersButton_clicked() } } gpgId.close(); - if (addFile) { - executeWrapper(gitExecutable, "add " + gpgIdFile); + if (!useWebDav){ + if (addFile) { + executeWrapper(gitExecutable, "add " + gpgIdFile); + } + QString path = gpgIdFile; + path.replace(QRegExp("\\.gpg$"), ""); + executeWrapper(gitExecutable, "commit " + gpgIdFile + " -m \"Added "+ path + " using QtPass\""); } } |