diff --git a/uppsrc/ide/Credentials.cpp b/uppsrc/ide/Credentials.cpp index e7d1b6b4a..64c7d5263 100644 --- a/uppsrc/ide/Credentials.cpp +++ b/uppsrc/ide/Credentials.cpp @@ -131,22 +131,13 @@ bool GetCredentials(const String& url, const String& dir, String& username, Stri int best = 0; if(LoadCredentials(cr)) { for(const Credential& c : cr) { - for(int pass = 0; pass < 2; pass++) { - const String& u = pass ? url : dir; - int n = min(u.GetCount(), c.url.GetCount()); - int ml; - for(ml = 0; ml < n; ml++) - if(u[ml] != c.url[ml]) - break; - if(ml > best) { - best = ml; - username = c.username; - password = c.password; - } + if(url.StartsWith(c.url) || dir.StartsWith(c.url)) { + username = c.username; + password = c.password; } } } - return best; + return false; } struct CredentialDlg : WithCredentialLayout { diff --git a/uppsrc/ide/RepoSync.cpp b/uppsrc/ide/RepoSync.cpp index e2badbb89..17386c543 100644 --- a/uppsrc/ide/RepoSync.cpp +++ b/uppsrc/ide/RepoSync.cpp @@ -317,7 +317,6 @@ void RepoSync::SyncList() o.pull = Default("pull"); actions = ListGit(path); if(!actions) { - o.push = false; o.commit.Disable(); } } diff --git a/uppsrc/ide/urepo.lay b/uppsrc/ide/urepo.lay index d1de4b175..c544c92bf 100644 --- a/uppsrc/ide/urepo.lay +++ b/uppsrc/ide/urepo.lay @@ -28,10 +28,10 @@ LAYOUT(SvnOptionsLayout, 140, 16) ITEM(Upp::Option, update, SetLabel(t_("Update")).LeftPosZ(72, 68).VCenterPosZ(16, 0)) END_LAYOUT -LAYOUT(GitOptionsLayout, 164, 16) - ITEM(Upp::Option, commit, SetLabel(t_("Commit")).LeftPosZ(4, 68).VCenterPosZ(16, 0)) - ITEM(Upp::Option, pull, SetLabel(t_("Pull(ff)")).LeftPosZ(64, 48).VCenterPosZ(16, 0)) - ITEM(Upp::Option, push, SetLabel(t_("Push")).LeftPosZ(116, 48).VCenterPosZ(16, 0)) +LAYOUT(GitOptionsLayout, 180, 16) + ITEM(Upp::Option, commit, SetLabel(t_("Commit")).LeftPosZ(0, 68).VCenterPosZ(16, 0)) + ITEM(Upp::Option, pull, SetLabel(t_("Pull(rebase)")).LeftPosZ(60, 72).VCenterPosZ(16, 0)) + ITEM(Upp::Option, push, SetLabel(t_("Push")).LeftPosZ(132, 48).VCenterPosZ(16, 0)) END_LAYOUT LAYOUT(CredentialLayout, 368, 140)