refactor: rename git command to align with others
This commit is contained in:
parent
87c5f729de
commit
07dd1cf009
4 changed files with 6 additions and 6 deletions
|
@ -153,7 +153,7 @@ impl GitRepository for FakeGitRepository {
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn git_log(&self, _skip: u64, _max_count: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>> {
|
fn log(&self, _skip: u64, _max_count: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>> {
|
||||||
async {
|
async {
|
||||||
Ok(vec![CommitDetails {
|
Ok(vec![CommitDetails {
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -363,7 +363,7 @@ pub trait GitRepository: Send + Sync {
|
||||||
|
|
||||||
/// Returns the git commit log returning at most `max_count` commits from
|
/// Returns the git commit log returning at most `max_count` commits from
|
||||||
/// the current branch, skipping `skip` results
|
/// the current branch, skipping `skip` results
|
||||||
fn git_log(&self, skip: u64, max_count: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>>;
|
fn log(&self, skip: u64, max_count: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>>;
|
||||||
|
|
||||||
fn load_commit(&self, commit: String, cx: AsyncApp) -> BoxFuture<'_, Result<CommitDiff>>;
|
fn load_commit(&self, commit: String, cx: AsyncApp) -> BoxFuture<'_, Result<CommitDiff>>;
|
||||||
fn blame(&self, path: RepoPath, content: Rope) -> BoxFuture<'_, Result<crate::blame::Blame>>;
|
fn blame(&self, path: RepoPath, content: Rope) -> BoxFuture<'_, Result<crate::blame::Blame>>;
|
||||||
|
@ -620,7 +620,7 @@ impl GitRepository for RealGitRepository {
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn git_log(&self, skip: u64, max_size: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>> {
|
fn log(&self, skip: u64, max_size: u64) -> BoxFuture<'_, Result<Vec<CommitDetails>>> {
|
||||||
let working_directory = self.working_directory();
|
let working_directory = self.working_directory();
|
||||||
self.executor
|
self.executor
|
||||||
.spawn(async move {
|
.spawn(async move {
|
||||||
|
|
|
@ -156,7 +156,7 @@ impl GitCommitList {
|
||||||
return Task::ready(Err(anyhow::anyhow!("no active repo")));
|
return Task::ready(Err(anyhow::anyhow!("no active repo")));
|
||||||
};
|
};
|
||||||
repo.update(cx, |repo, cx| {
|
repo.update(cx, |repo, cx| {
|
||||||
let git_log = repo.git_log(skip, max_count);
|
let git_log = repo.log(skip, max_count);
|
||||||
cx.spawn(async move |_, _| git_log.await?)
|
cx.spawn(async move |_, _| git_log.await?)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3401,7 +3401,7 @@ impl Repository {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn git_log(
|
pub fn log(
|
||||||
&mut self,
|
&mut self,
|
||||||
skip: u64,
|
skip: u64,
|
||||||
max_count: u64,
|
max_count: u64,
|
||||||
|
@ -3409,7 +3409,7 @@ impl Repository {
|
||||||
let id = self.id;
|
let id = self.id;
|
||||||
self.send_job(None, move |git_repo, _cx| async move {
|
self.send_job(None, move |git_repo, _cx| async move {
|
||||||
match git_repo {
|
match git_repo {
|
||||||
RepositoryState::Local { backend, .. } => backend.git_log(skip, max_count).await,
|
RepositoryState::Local { backend, .. } => backend.log(skip, max_count).await,
|
||||||
RepositoryState::Remote { project_id, client } => {
|
RepositoryState::Remote { project_id, client } => {
|
||||||
let resp = client
|
let resp = client
|
||||||
.request(proto::GitLog {
|
.request(proto::GitLog {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue