| 161 | } |
| 162 | |
| 163 | func (m projectFS) GitCommit(ctx context.Context, commit string) error { |
| 164 | if !m.dryRun && m.beforeCommitHook != nil { |
| 165 | if err := m.beforeCommitHook(); err != nil { |
| 166 | return err |
| 167 | } |
| 168 | } |
| 169 | var prefix string |
| 170 | if m.skipGit { |
| 171 | prefix = "[skip] " |
| 172 | } |
| 173 | m.logger.Printf(prefix+"git commit: '%s'", commit) |
| 174 | if m.dryRun || m.skipGit { |
| 175 | return nil |
| 176 | } |
| 177 | return gitCommit(ctx, commit) |
| 178 | } |
| 179 | |
| 180 | func newRepoData(versionExtraAllowList []string) (helper.RepoData, error) { |
| 181 | cwd, err := os.Getwd() |