mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-15 22:02:51 -06:00
ide: git adjustments
This commit is contained in:
parent
5bf43e2ea4
commit
e7eba7de35
3 changed files with 8 additions and 18 deletions
|
|
@ -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<TopWindow> {
|
||||
|
|
|
|||
|
|
@ -317,7 +317,6 @@ void RepoSync::SyncList()
|
|||
o.pull = Default("pull");
|
||||
actions = ListGit(path);
|
||||
if(!actions) {
|
||||
o.push = false;
|
||||
o.commit.Disable();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue