mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
fix: address verified review findings (repo-mutations-sync-1)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
11 files changed
+283
-30
No files matched your search
@@ -55,6 +55,13 @@ $ tea repo sync bob/project`,
|
||||
remote, err := "", errNoMatchingRemote
|
||||
if inside == "true" {
|
||||
remote, err = a.checkoutRemote(cmd.Context(), target, snapshot)
|
||||
// A remote preference only picks among the remotes of this repository: a repository
|
||||
// argument that no remote here names is synced on the server, as without one.
|
||||
if err != nil && len(args) > 0 && a.options.remote == "" {
|
||||
if matches, matchErr := a.remotesForRepositoryURLs(cmd.Context(), target.hosts(), "", "", target.Repo); matchErr == nil && len(matches) == 0 {
|
||||
err = errNoMatchingRemote
|
||||
}
|
||||
}
|
||||
}
|
||||
switch {
|
||||
case errors.Is(err, errNoMatchingRemote) && len(args) > 0:
|
||||
|
||||
Reference in new issue
Block a user