-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync remotes #15
base: master
Are you sure you want to change the base?
Sync remotes #15
Conversation
514bea8
to
3a1294e
Compare
This makes things obvious in case a remote name is remote or has
3a1294e
to
b011484
Compare
@majewsky ping |
@@ -381,7 +465,7 @@ func (i *Index) ImportRepo(dirPath string) error { | |||
return errors.New("repo has no remotes") | |||
} | |||
|
|||
question := fmt.Sprintf("Repo has multiple remotes. Where to put below %s?", RootPath) | |||
question := fmt.Sprintf(`Repo has multiple remotes. Where to put below "%s"?`, RootPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question := fmt.Sprintf(`Repo has multiple remotes. Where to put below "%s"?`, RootPath) | |
question := fmt.Sprintf("Repo has multiple remotes. Where to put below %q?", RootPath) |
|
||
// ask the user what to do with remotes not existing in checked out repo | ||
selection, err := cli.Interface.Query( | ||
fmt.Sprintf(`repository "%s" remote "%s" has been deleted`, repo.AbsolutePath(), remote.Name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Sprintf(`repository "%s" remote "%s" has been deleted`, repo.AbsolutePath(), remote.Name), | |
fmt.Sprintf(`repository %q remote %q has been deleted`, repo.AbsolutePath(), remote.Name), |
Also, I suggest the clearer phrasing remote %q of repository %q has been deleted
.
toUpdate = append(toUpdate, remote.Name) | ||
newRemotes = append(newRemotes, remote) | ||
case "d": | ||
case "s": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s
should add the remote to the new list, i.e. effectively not touch it.
When deleting a remote that is registered in the index, rtree now asks what to do with it like when encountering a deleted repo.
Closes #11