git_over_here

package
v0.0.0-...-a12d0ae Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepoBase

func GetRepoBase() (string, error)

GetRepoBase Returns the location of the .git directory for the current repo by searching up the directory tree until it finds it, gets an error, or reaches the maximum number of iterations

func GetRepoRelativePath

func GetRepoRelativePath(relativePath string) (string, error)

GetRepoRelativePath returns an absolute path for a file relative to the directory that contains the .git directory. If the git repo is in `/home/user/repo/.git` and you pass in "main.go" it will return `/home/user/repo/main.go`. This is determined by finding the .git directory, going up one level, joining the relative path to that directory, and then returning the absolute path.

func RunCommandInRepoDirectoriesWithFile

func RunCommandInRepoDirectoriesWithFile(file string, command []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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