| 37 | } |
| 38 | |
| 39 | func (repo *LocalGitRepository) Remote(ctx context.Context) (*gitutil.Remote, error) { |
| 40 | var remote *gitutil.Remote |
| 41 | err := repo.mount(ctx, 0, false, nil, func(git *gitutil.GitCLI) error { |
| 42 | gitURL, err := git.URL(ctx) |
| 43 | if err != nil { |
| 44 | return err |
| 45 | } |
| 46 | remote, err = gitutil.NewGitCLI().LsRemote(ctx, gitURL) |
| 47 | return err |
| 48 | }) |
| 49 | if err != nil { |
| 50 | return nil, err |
| 51 | } |
| 52 | return remote, nil |
| 53 | } |
| 54 | |
| 55 | func (repo *LocalGitRepository) File(ctx context.Context, filename string) (*File, error) { |
| 56 | var gitDir string |