From 062b2934bf28cf569c082c7fa1b8bd03096cf43b Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Tue, 19 Sep 2017 10:42:19 -0500 Subject: [PATCH] Add additional docstrings --- base/libgit2/types.jl | 12 ++++++++++++ doc/src/devdocs/libgit2.md | 14 +++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/base/libgit2/types.jl b/base/libgit2/types.jl index 0dd8e7704076d..6a8ade8e76cd3 100644 --- a/base/libgit2/types.jl +++ b/base/libgit2/types.jl @@ -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) @@ -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) diff --git a/doc/src/devdocs/libgit2.md b/doc/src/devdocs/libgit2.md index e8e95d82d1ab1..3b6c49065691f 100644 --- a/doc/src/devdocs/libgit2.md +++ b/doc/src/devdocs/libgit2.md @@ -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 @@ -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! @@ -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! @@ -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 @@ -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 ```