1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-06-24 22:42:28 +00:00

Fix style command

This commit is contained in:
2025-01-10 15:28:42 +01:00
parent 365e530efc
commit 399173b776
30 changed files with 462 additions and 402 deletions

View File

@ -19,7 +19,7 @@ bool Git::clone(QString url, QString destination_dir_path)
qDebug() << "Cloning " << url << " to tmp dir " << tmp_dir.absolutePath();
auto ret = LibGit::instance()->clone(url, tmp_dir.absolutePath()); // TODO Better error handling
if(ret) {
if (ret) {
qDebug() << "Removing password_store " << destination_dir_path;
QDir destination_dir(destination_dir_path);
destination_dir.removeRecursively();

View File

@ -13,12 +13,13 @@ LibGit::LibGit()
git_libgit2_init();
}
LibGit::~LibGit() {
LibGit::~LibGit()
{
git_libgit2_shutdown();
}
int LibGit::credentials_cb(git_cred **out, const char *url, const char *username_from_url,
unsigned int allowed_types, void *payload)
unsigned int allowed_types, void *payload)
{
int error;
const char *user, *pass;
@ -38,7 +39,8 @@ int LibGit::credentials_cb(git_cred **out, const char *url, const char *username
return GIT_EUSER;
}
bool LibGit::clone(QString url, QString path) {
bool LibGit::clone(QString url, QString path)
{
git_repository *repo = NULL;
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
opts.fetch_opts.callbacks.credentials = *credentials_cb;

View File

@ -13,7 +13,7 @@ class LibGit
private:
LibGit();
static int credentials_cb(git_cred **out, const char *url, const char *username_from_url,
unsigned int allowed_types, void *payload);
unsigned int allowed_types, void *payload);
public: