git

package
v0.0.0-...-46da95b Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchNameFromDir

func BranchNameFromDir(inputDir string) (string, error)

func GetFirstRemote

func GetFirstRemote(inputDir string) (string, error)

GetFirstRemote retrieves the first available remote URL from a git repository.

Parameters:

  • inputDir (string): The directory path to check for git repository

Returns:

  • The first remote URL as a string.
  • An error object (if no git repository found or no remotes configured).

func GetOriginRemote

func GetOriginRemote(inputDir string) (string, error)

GetOriginRemote retrieves the origin remote URL from a git repository.

Parameters:

  • inputDir (string): The directory path to check for git repository

Returns:

  • The origin remote URL as a string.
  • An error object (if no git repository found or no origin remote configured).

func GetRemoteUrl

func GetRemoteUrl(inputDir string) (string, error)

GetRemoteUrl retrieves the appropriate remote URL for LDX-Sync resolution. Priority: origin remote first, then first available remote.

Parameters:

  • inputDir (string): The directory path to check for git repository

Returns:

  • The remote URL as a string.
  • An error object (if no git repository found or no remotes configured).

func RepoFromDir

func RepoFromDir(inputDir string) (*git.Repository, *config.RemoteConfig, error)

func RepoUrlFromDir

func RepoUrlFromDir(inputDir string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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