Module git

Module git 

Source

Structs§

Prompt
Represents the collected Git information for rendering the prompt.

Constants§

ACTION_AM
ACTION_AM_REBASE
ACTION_BISECT
ACTION_CHERRY
ACTION_CHERRY_OR_REVERT
ACTION_CHERRY_SEQ
ACTION_MERGE
ACTION_REBASE
Constants representing various Git actions or states. These are used to provide short, descriptive labels for the current Git operation.
ACTION_REBASE_I
ACTION_REBASE_M
NO_BRANCH

Functions§

build_prompt_fast
Builds a Prompt struct containing fast/synchronous local Git information.
get_action
Determines the current Git action (e.g., rebase, merge, cherry-pick) by checking for the presence of specific files in the .git directory.
get_auth_cache_path
Generates the path for the Git authentication cache file for a given repository.
get_status
Returns a string summarizing the git status of the repository.
is_ahead_behind_remote
Determines how many commits the current HEAD is ahead or behind its upstream remote.
is_staged
Checks if there are any staged changes in the repository.
read_auth_status
Reads the cached Git authentication status for a given repository.
unix_timestamp
Returns the current Unix timestamp (seconds since UNIX_EPOCH).