Error for http remotes

This commit is contained in:
Gregory Schier
2025-02-07 13:31:27 -08:00
parent a42bee098b
commit 266892dc8d
2 changed files with 15 additions and 9 deletions
+1 -1
View File
@@ -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"));
} }
} }
}); });
+7 -1
View File
@@ -214,13 +214,19 @@ 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, {
onSuccess(message) {
if (message === 'nothing_to_push') { if (message === 'nothing_to_push') {
showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' }); showToast({ id: 'push-success', message: 'Nothing to push', color: 'info' });
} else { } else {
showToast({ id: 'push-success', message: 'Push successful', color: 'success' }); showToast({ id: 'push-success', message: 'Push successful', color: 'success' });
} }
}, },
onError(err) {
showErrorToast('git-pull-error', String(err));
},
});
},
}, },
{ {
label: 'Pull', label: 'Pull',