Module git

Module git 

Source

Structs§

ExpandedFetchRefSpecs
Represents the refspecs to fetch from a remote
GitBranchPushTargets
GitExportStats
Describes changes made by export_refs().
GitFetch
Helper struct to execute multiple git fetch operations
GitImportStats
Describes changes made by import_refs() or fetch().
GitPushStats
Stats from a git push
GitRefUpdate
IgnoredRefspec
A fetch refspec configured within a remote that was ignored during expansion.
IgnoredRefspecs
A list of fetch refspecs configured within a remote that were ignored during a expansion. Callers should consider displaying these in the UI as appropriate.
Progress
RemoteCallbacks
UnexpectedGitBackendError

Enums§

FailedRefExportReason
The reason we failed to export a ref to Git.
FetchTagsOverride
Allows temporarily overriding the behavior of a single git fetch operation as to whether tags are fetched
GitDefaultRefspecError
GitExportError
GitFetchError
GitImportError
GitPushError
GitRefExpansionError
GitRefKind
Type of Git ref to be imported or exported.
GitRemoteManagementError
GitRemoteNameError
GitResetHeadError

Constants§

REMOTE_NAME_FOR_LOCAL_GIT_REPO
Reserved remote name for the backing Git repo.
RESERVED_REMOTE_REF_NAMESPACE
Git ref prefix that would conflict with the reserved “git” remote.

Functions§

add_remote
expand_default_fetch_refspecs
Expand the remote’s configured fetch refspecs
expand_fetch_refspecs
Expand a list of branch string patterns to refspecs to fetch
export_refs
Export changes to bookmarks and tags made in the Jujutsu repo compared to our last seen view of the Git repo in mut_repo.view().git_refs().
export_some_refs
get_all_remote_names
Returns a sorted list of configured remote names.
get_git_backend
Returns the underlying GitBackend implementation.
get_git_repo
Returns new thread-local instance to access to the underlying Git repo.
import_head
Imports HEAD from the underlying Git repo.
import_refs
Reflect changes made in the underlying Git repo in the Jujutsu repo.
import_some_refs
Reflect changes made in the underlying Git repo in the Jujutsu repo.
parse_git_ref
Translates Git ref name to jj’s name@remote symbol. Returns None if the ref cannot be represented in jj.
push_branches
Pushes the specified branches and updates the repo view accordingly.
push_updates
Pushes the specified Git refs without updating the repo view.
remove_remote
rename_remote
reset_head
Sets Git HEAD to the parent of the given working-copy commit and resets the Git index.
set_remote_url
update_intent_to_add
Diff old_tree to new_tree and mark added files as intent-to-add in the Git index. Also removes current intent-to-add entries in the index if they were removed in the diff.