Module git

Source

Structs§

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
Progress
RemoteCallbacks
UnexpectedGitBackendError

Enums§

FailedRefExportReason
The reason we failed to export a ref to Git.
GitExportError
GitFetchError
GitImportError
GitPushError
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
export_refs
Export changes to bookmarks 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.
is_special_git_remote
Determine, by its name, if a remote refers to the special local-only “git” remote that is used in the Git backend.
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.