| | |
| | | // find the root, cached |
| | | String key = getRepositoryKey(repository); |
| | | RepositoryModel model = repositoryListCache.get(key); |
| | | if (model == null) { |
| | | return null; |
| | | } |
| | | |
| | | while (model.originRepository != null) { |
| | | String originKey = getRepositoryKey(model.originRepository); |
| | | model = repositoryListCache.get(originKey); |
| | | if (model == null) { |
| | | return null; |
| | | } |
| | | } |
| | | ForkModel root = getForkModelFromCache(model.name); |
| | | return root; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates/updates the repository model keyed by reopsitoryName. Saves all |
| | | * Creates/updates the repository model keyed by repositoryName. Saves all |
| | | * repository settings in .git/config. This method allows for renaming |
| | | * repositories and will update user access permissions accordingly. |
| | | * |