git

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

functions copied from https://github.com/xhd2015/gitops

Index

Constants

View Source
const COMMIT_WORKING = "WORKING"

Variables

This section is empty.

Functions

func FetchRef added in v1.0.36

func FetchRef(dir string, origin string, ref string) error

func GetCurrentBranch added in v1.0.36

func GetCurrentBranch(dir string) (string, error)

func GetGitDir

func GetGitDir(dir string) (string, error)

when multiple worktree exists, this denotes to the only one .git

func ListFileUpdates added in v1.1.1

func ListFileUpdates(dir string, ref string, compareRef string, patterns []string) ([]string, error)

ListFileUpdates lists all updated files in the given directory

func ListModifiedFiles added in v1.1.1

func ListModifiedFiles(dir string, ref string, compareRef string, patterns []string) ([]string, error)

git diff --diff-filter=M --name-only --ignore-submodules "$compareRef" "$ref" -- ${patterns} || true

func ShowTopLevel

func ShowTopLevel(dir string) (string, error)

worktree root

Types

This section is empty.

Jump to

Keyboard shortcuts

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