Skip to content

Commit

Permalink
Add additional docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Sep 19, 2017
1 parent a22b445 commit 062b293
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
12 changes: 12 additions & 0 deletions base/libgit2/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,12 @@ function reset!(p::CredentialPayload)
return p
end

"""
approve(payload::CredentialPayload) -> Void
Store the `payload` credential for re-use in a future authentication. Should only be called
when authentication was successful.
"""
function approve(p::CredentialPayload)
isnull(p.credential) && return # No credentials were used
cred = unsafe_get(p.credential)
Expand All @@ -1248,6 +1254,12 @@ function approve(p::CredentialPayload)
end
end

"""
reject(payload::CredentialPayload) -> Void
Discard the `payload` credential from begin re-used in future authentication. Should only be
called when authentication was unsuccessful.
"""
function reject(p::CredentialPayload)
isnull(p.credential) && return # No credentials were used
cred = unsafe_get(p.credential)
Expand Down
14 changes: 9 additions & 5 deletions doc/src/devdocs/libgit2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ For more information on some of the objects and methods referenced here, consult
[libgit2 API reference](https://libgit2.github.com/libgit2/#v0.25.1).

```@docs
Base.LibGit2.AbstractCredentials
Base.LibGit2.Buffer
Base.LibGit2.CachedCredentials
Base.LibGit2.CheckoutOptions
Base.LibGit2.CloneOptions
Base.LibGit2.DescribeOptions
Expand Down Expand Up @@ -49,13 +47,11 @@ Base.LibGit2.PushOptions
Base.LibGit2.RebaseOperation
Base.LibGit2.RebaseOptions
Base.LibGit2.RemoteCallbacks
Base.LibGit2.SSHCredentials
Base.LibGit2.SignatureStruct
Base.LibGit2.StatusEntry
Base.LibGit2.StatusOptions
Base.LibGit2.StrArrayStruct
Base.LibGit2.TimeStruct
Base.LibGit2.UserPasswordCredentials
Base.LibGit2.add!
Base.LibGit2.add_fetch!
Base.LibGit2.add_push!
Expand Down Expand Up @@ -92,6 +88,7 @@ Base.LibGit2.features
Base.LibGit2.filename
Base.LibGit2.filemode
Base.LibGit2.gitdir
Base.LibGit2.git_url
Base.LibGit2.@githash_str
Base.LibGit2.head
Base.LibGit2.head!
Expand All @@ -103,7 +100,6 @@ Base.LibGit2.isbinary
Base.LibGit2.iscommit
Base.LibGit2.isdiff
Base.LibGit2.isdirty
Base.LibGit2.isfilled
Base.LibGit2.isorphan
Base.LibGit2.isset
Base.LibGit2.iszero
Expand Down Expand Up @@ -154,4 +150,12 @@ Base.LibGit2.with
Base.LibGit2.with_warn
Base.LibGit2.workdir
Base.LibGit2.GitObject(::Base.LibGit2.GitTreeEntry)
Base.LibGit2.AbstractCredentials
Base.LibGit2.UserPasswordCredentials
Base.LibGit2.SSHCredentials
Base.LibGit2.isfilled
Base.LibGit2.CachedCredentials
Base.LibGit2.CredentialPayload
Base.LibGit2.approve
Base.LibGit2.reject
```

0 comments on commit 062b293

Please sign in to comment.