(tp, name string)
| 977 | } |
| 978 | |
| 979 | func getRepoInitFile(tp, name string) ([]byte, error) { |
| 980 | relPath := path.Join(tp, strings.TrimLeft(path.Clean("/"+name), "/")) |
| 981 | |
| 982 | // Use custom file when available. |
| 983 | customPath := filepath.Join(conf.CustomDir(), "conf", relPath) |
| 984 | if osutil.IsFile(customPath) { |
| 985 | return os.ReadFile(customPath) |
| 986 | } |
| 987 | return embedConf.Files.ReadFile(relPath) |
| 988 | } |
| 989 | |
| 990 | func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRepoOptionsLegacy) error { |
| 991 | // Clone to temporary path and do the init commit. |
no test coverage detected