Documentation
¶
Index ¶
- func BranchNameFromDir(inputDir string) (string, error)
- func GetFirstRemote(inputDir string) (string, error)
- func GetOriginRemote(inputDir string) (string, error)
- func GetRemoteUrl(inputDir string) (string, error)
- func RepoFromDir(inputDir string) (*git.Repository, *config.RemoteConfig, error)
- func RepoUrlFromDir(inputDir string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchNameFromDir ¶
func GetFirstRemote ¶
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 ¶
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 ¶
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 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.