SlHelpers
Loading...
Searching...
No Matches
SlGit::FetchCallbacks Class Reference

Callbacks invoked from Repo::clone() or Remote::fetchRefspecs(). More...

#include <FetchCallbacks.h>

Inheritance diagram for SlGit::FetchCallbacks:
SlGit::DefaultFetchCallbacks

Public Member Functions

 FetchCallbacks ()
 Construct FetchCallbacks.
virtual void checkoutProgress (std::string_view path, size_t completedSteps, size_t totalSteps)
 Called for each path in the tree.
virtual int credentials (git_credential **cred, std::string_view url, std::optional< std::string_view > usernameFromUrl, unsigned int allowedTypes)
 Fill in credentials.
virtual int packProgress (int stage, uint32_t current, uint32_t total)
 Called many times when packing objects.
virtual int sidebandProgress (std::string_view str)
 Callback for messages received by the transport.
virtual int transferProgress (const git_indexer_progress &stats)
 Called many times during download and indexing.
virtual int updateRefs (std::string_view refname, const git_oid &a, const git_oid &b, git_refspec &ref)
 Called for each updated reference.

Detailed Description

Callbacks invoked from Repo::clone() or Remote::fetchRefspecs().

See also DefaultFetchCallbacks for the default implementation.

Member Function Documentation

◆ checkoutProgress()

virtual void SlGit::FetchCallbacks::checkoutProgress ( std::string_view path,
size_t completedSteps,
size_t totalSteps )
inlinevirtual

Called for each path in the tree.

Parameters
pathPath being checked out
completedStepsCount of steps done
totalStepsCount of all steps

Reimplemented in SlGit::DefaultFetchCallbacks.

◆ credentials()

virtual int SlGit::FetchCallbacks::credentials ( git_credential ** cred,
std::string_view url,
std::optional< std::string_view > usernameFromUrl,
unsigned int allowedTypes )
inlinevirtual

Fill in credentials.

Parameters
credOutput
urlFor which URL
usernameFromUrlUsername detected in url
allowedTypesGIT_CREDENTIAL_USERNAME, GIT_CREDENTIAL_SSH_KEY, ...
Returns
Zero for success.

Reimplemented in SlGit::DefaultFetchCallbacks.

◆ packProgress()

virtual int SlGit::FetchCallbacks::packProgress ( int stage,
uint32_t current,
uint32_t total )
inlinevirtual

Called many times when packing objects.

Parameters
stageAt what stage the packing is (GIT_PACKBUILDER_ADDING_OBJECTS, ...)
currentCurrently packed object
totalTotal number of objects
Returns
Zero for success.

Reimplemented in SlGit::DefaultFetchCallbacks.

◆ sidebandProgress()

virtual int SlGit::FetchCallbacks::sidebandProgress ( std::string_view str)
inlinevirtual

Callback for messages received by the transport.

Parameters
strThe message from the transport
Returns
Zero for success.

Reimplemented in SlGit::DefaultFetchCallbacks.

◆ transferProgress()

virtual int SlGit::FetchCallbacks::transferProgress ( const git_indexer_progress & stats)
inlinevirtual

Called many times during download and indexing.

Parameters
statsThe statistics
Returns
Zero for success.

Reimplemented in SlGit::DefaultFetchCallbacks.

◆ updateRefs()

virtual int SlGit::FetchCallbacks::updateRefs ( std::string_view refname,
const git_oid & a,
const git_oid & b,
git_refspec & ref )
inlinevirtual

Called for each updated reference.

Parameters
refnameThe name of the reference
aThe original OID
bThe new OID
refThe reference structure
Returns
Zero for success.

Reimplemented in SlGit::DefaultFetchCallbacks.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/git/FetchCallbacks.h