@@ -9,7 +9,7 @@ function mirror_callback(remote::Ptr{Ptr{Cvoid}}, repo_ptr::Ptr{Cvoid},
9
9
ensure_initialized ()
10
10
# Create the remote with a mirroring url
11
11
fetch_spec = " +refs/*:refs/*"
12
- err = ccall ((:git_remote_create_with_fetchspec , : libgit2 ), Cint,
12
+ err = ccall ((:git_remote_create_with_fetchspec , libgit2), Cint,
13
13
(Ptr{Ptr{Cvoid}}, Ptr{Cvoid}, Cstring, Cstring, Cstring),
14
14
remote, repo_ptr, name, url, fetch_spec)
15
15
err != 0 && return Cint (err)
43
43
function user_abort ()
44
44
ensure_initialized ()
45
45
# Note: Potentially it could be better to just throw a Julia error.
46
- ccall ((:giterr_set_str , : libgit2 ), Cvoid,
46
+ ccall ((:giterr_set_str , libgit2), Cvoid,
47
47
(Cint, Cstring), Cint (Error. Callback),
48
48
" Aborting, user cancelled credential request." )
49
49
return Cint (Error. EUSER)
50
50
end
51
51
52
52
function prompt_limit ()
53
53
ensure_initialized ()
54
- ccall ((:giterr_set_str , : libgit2 ), Cvoid,
54
+ ccall ((:giterr_set_str , libgit2), Cvoid,
55
55
(Cint, Cstring), Cint (Error. Callback),
56
56
" Aborting, maximum number of prompts reached." )
57
57
return Cint (Error. EAUTH)
58
58
end
59
59
60
60
function exhausted_abort ()
61
61
ensure_initialized ()
62
- ccall ((:giterr_set_str , : libgit2 ), Cvoid,
62
+ ccall ((:giterr_set_str , libgit2), Cvoid,
63
63
(Cint, Cstring), Cint (Error. Callback),
64
64
" All authentication methods have failed." )
65
65
return Cint (Error. EAUTH)
@@ -79,7 +79,7 @@ function authenticate_ssh(libgit2credptr::Ptr{Ptr{Cvoid}}, p::CredentialPayload,
79
79
80
80
# first try ssh-agent if credentials support its usage
81
81
if p. use_ssh_agent && username_ptr != Cstring (C_NULL ) && (! revised || ! isfilled (cred))
82
- err = ccall ((:git_cred_ssh_key_from_agent , : libgit2 ), Cint,
82
+ err = ccall ((:git_cred_ssh_key_from_agent , libgit2), Cint,
83
83
(Ptr{Ptr{Cvoid}}, Cstring), libgit2credptr, username_ptr)
84
84
85
85
p. use_ssh_agent = false # use ssh-agent only one time
@@ -175,7 +175,7 @@ function authenticate_ssh(libgit2credptr::Ptr{Ptr{Cvoid}}, p::CredentialPayload,
175
175
if ! revised
176
176
return exhausted_abort ()
177
177
end
178
- return ccall ((:git_cred_ssh_key_new , : libgit2 ), Cint,
178
+ return ccall ((:git_cred_ssh_key_new , libgit2), Cint,
179
179
(Ptr{Ptr{Cvoid}}, Cstring, Cstring, Cstring, Cstring),
180
180
libgit2credptr, cred. user, cred. pubkey, cred. prvkey, cred. pass)
181
181
end
@@ -235,7 +235,7 @@ function authenticate_userpass(libgit2credptr::Ptr{Ptr{Cvoid}}, p::CredentialPay
235
235
return exhausted_abort ()
236
236
end
237
237
238
- return ccall ((:git_cred_userpass_plaintext_new , : libgit2 ), Cint,
238
+ return ccall ((:git_cred_userpass_plaintext_new , libgit2), Cint,
239
239
(Ptr{Ptr{Cvoid}}, Cstring, Cstring),
240
240
libgit2credptr, cred. user, cred. pass)
241
241
end
@@ -339,7 +339,7 @@ function credentials_callback(libgit2credptr::Ptr{Ptr{Cvoid}}, url_ptr::Cstring,
339
339
if err == 0
340
340
if p. explicit != = nothing
341
341
ensure_initialized ()
342
- ccall ((:giterr_set_str , : libgit2 ), Cvoid, (Cint, Cstring), Cint (Error. Callback),
342
+ ccall ((:giterr_set_str , libgit2), Cvoid, (Cint, Cstring), Cint (Error. Callback),
343
343
" The explicitly provided credential is incompatible with the requested " *
344
344
" authentication methods." )
345
345
end
0 commit comments