mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-09 14:25:12 +02:00
Error for http remotes
This commit is contained in:
@@ -35,7 +35,7 @@ pub(crate) fn default_callbacks<'s>() -> RemoteCallbacks<'s> {
|
|||||||
}
|
}
|
||||||
(true, None) => Err(git2::Error::from_str("Couldn't get username from url")),
|
(true, None) => Err(git2::Error::from_str("Couldn't get username from url")),
|
||||||
_ => {
|
_ => {
|
||||||
todo!("Implement basic auth credential");
|
return Err(git2::Error::from_str("https remotes are not (yet) supported"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -71,6 +71,6 @@ pub(crate) fn default_callbacks<'s>() -> RemoteCallbacks<'s> {
|
|||||||
debug!("sideband transfer: '{}'", String::from_utf8_lossy(data).trim());
|
debug!("sideband transfer: '{}'", String::from_utf8_lossy(data).trim());
|
||||||
true
|
true
|
||||||
});
|
});
|
||||||
|
|
||||||
callbacks
|
callbacks
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,12 +214,18 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
|||||||
leftSlot: <Icon icon="arrow_up_from_line" />,
|
leftSlot: <Icon icon="arrow_up_from_line" />,
|
||||||
waitForOnSelect: true,
|
waitForOnSelect: true,
|
||||||
async onSelect() {
|
async onSelect() {
|
||||||
const message = await push.mutateAsync();
|
push.mutate(undefined, {
|
||||||
if (message === 'nothing_to_push') {
|
onSuccess(message) {
|
||||||
showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' });
|
if (message === 'nothing_to_push') {
|
||||||
} else {
|
showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' });
|
||||||
showToast({ id: 'push-success', message: 'Push successful', color: 'success' });
|
} else {
|
||||||
}
|
showToast({ id: 'push-success', message: 'Push successful', color: 'success' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onError(err) {
|
||||||
|
showErrorToast('git-pull-error', String(err));
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user