git

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package git provides helpers for interacting with local git repositories and configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrFetchBaseBranch

func GetOrFetchBaseBranch(ctx context.Context, f forges.Forge, dir, owner, repo, branch string, forceRefresh bool) (string, error)

GetOrFetchBaseBranch returns the base branch of the given branch. It first checks the local git configuration for a cached value. If not found, it queries the forge API for an open pull request for the branch, caches the base branch name in the local git configuration, and returns it. If branch is empty, it uses the current branch.

func SetBaseBranch

func SetBaseBranch(ctx context.Context, dir, branch, base string) error

SetBaseBranch caches the base branch for a branch in the local git configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL