isGitRepository checks if the given path is inside a git repository
(path string)
| 9 | |
| 10 | // isGitRepository checks if the given path is inside a git repository |
| 11 | func isGitRepository(path string) bool { |
| 12 | _, _, err := runGitCommand(path, "rev-parse", "--git-dir") |
| 13 | return err == nil |
| 14 | } |
| 15 | |
| 16 | // GetRepositoryRoot returns the absolute path to the repository root |
| 17 | func GetRepositoryRoot(repoPath string) (string, error) { |