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:
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user