Avoid polluting branch list and restore parent commit when using checkpoints (#27191)

Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2025-03-20 16:00:23 +01:00 committed by GitHub
parent d0641a38a4
commit f365b80814
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 268 additions and 44 deletions

View file

@ -5,8 +5,8 @@ use futures::future::{self, BoxFuture};
use git::{
blame::Blame,
repository::{
AskPassSession, Branch, CommitDetails, GitRepository, PushOptions, Remote, RepoPath,
ResetMode,
AskPassSession, Branch, CommitDetails, GitRepository, GitRepositoryCheckpoint, PushOptions,
Remote, RepoPath, ResetMode,
},
status::{FileStatus, GitStatus, StatusCode, TrackedStatus, UnmergedStatus},
};
@ -409,11 +409,15 @@ impl GitRepository for FakeGitRepository {
unimplemented!()
}
fn checkpoint(&self, _cx: AsyncApp) -> BoxFuture<Result<git::Oid>> {
fn checkpoint(&self, _cx: AsyncApp) -> BoxFuture<Result<GitRepositoryCheckpoint>> {
unimplemented!()
}
fn restore_checkpoint(&self, _oid: git::Oid, _cx: AsyncApp) -> BoxFuture<Result<()>> {
fn restore_checkpoint(
&self,
_checkpoint: GitRepositoryCheckpoint,
_cx: AsyncApp,
) -> BoxFuture<Result<()>> {
unimplemented!()
}
}