Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a552765
feat(git_graph): add commit context menu operations
nguyenphutrong May 6, 2026
507cee6
feat(git_graph): add ref context menu operations
nguyenphutrong May 6, 2026
026e357
perf(git_graph): speed up context menus
nguyenphutrong May 6, 2026
4cc8c51
fix(git_graph): block scrolling with context menu open
nguyenphutrong May 6, 2026
654d9d9
fix(git_graph): block table scroll with context menu open
nguyenphutrong May 6, 2026
a29f30d
fix(git_graph): address push and revert review findings
nguyenphutrong May 6, 2026
4cb4efc
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 6, 2026
478e002
fix(git_graph): expose commit ops and tag push remote picker
nguyenphutrong May 6, 2026
60afa11
fix(git_graph): reopen commit context menu on right click
nguyenphutrong May 6, 2026
10f8db5
fix(git_graph): switch context menus between refs and commits
nguyenphutrong May 6, 2026
295243a
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 6, 2026
383d8e2
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 7, 2026
5f742a4
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 8, 2026
925305f
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 11, 2026
0499db4
fix: add missing git graph job descriptions
nguyenphutrong May 11, 2026
bf69f4d
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 13, 2026
8548ca5
refactor(git_graph): split context menu code
nguyenphutrong May 13, 2026
3d9008d
Merge branch 'main' into feature/git-graph-context-menu
nguyenphutrong May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 78 additions & 2 deletions crates/fs/src/fake_git_repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use git::{
blame::Blame,
repository::{
AskPassDelegate, Branch, CommitData, CommitDataReader, CommitDetails, CommitOptions,
CreateWorktreeTarget, FetchOptions, GRAPH_CHUNK_SIZE, GitRepository,
CreateWorktreeTarget, DropCommitSupport, FetchOptions, GRAPH_CHUNK_SIZE, GitRepository,
GitRepositoryCheckpoint, InitialGraphCommitData, LogOrder, LogSource, PushOptions, RefEdit,
Remote, RepoPath, ResetMode, SearchCommitArgs, Worktree,
Remote, RemoteCommandOutput, RepoPath, ResetMode, SearchCommitArgs, Worktree,
},
stash::GitStash,
status::{
Expand Down Expand Up @@ -326,6 +326,10 @@ impl GitRepository for FakeGitRepository {
state.head_contents = snapshot.head_contents;
state.index_contents = state.head_contents.clone();
}
ResetMode::Hard => {
state.head_contents = snapshot.head_contents;
state.index_contents = state.head_contents.clone();
}
}

state.refs.insert("HEAD".into(), snapshot.sha);
Expand Down Expand Up @@ -894,6 +898,59 @@ impl GitRepository for FakeGitRepository {
})
}

fn create_branch_at(&self, _sha: String, name: String) -> BoxFuture<'_, Result<()>> {
self.with_state_async(true, move |state| {
state.branches.insert(name);
Ok(())
})
}

fn create_tag(
&self,
_sha: String,
_name: String,
_message: Option<String>,
) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn checkout_commit(&self, _sha: String) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn cherry_pick(
&self,
_sha: String,
_record_origin: bool,
_no_commit: bool,
) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn revert_commit(&self, _sha: String, _no_commit: bool) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn drop_commit_support(&self, _sha: String) -> BoxFuture<'_, Result<DropCommitSupport>> {
future::ready(Ok(DropCommitSupport {
can_drop: true,
reason: None,
}))
.boxed()
}

fn drop_commit(&self, _sha: String) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn merge_commit(&self, _sha: String) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn rebase_onto(&self, _sha: String) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn rename_branch(&self, branch: String, new_name: String) -> BoxFuture<'_, Result<()>> {
self.with_state_async(true, move |state| {
if !state.branches.remove(&branch) {
Expand Down Expand Up @@ -927,6 +984,25 @@ impl GitRepository for FakeGitRepository {
})
}

fn delete_tag(&self, _name: String) -> BoxFuture<'_, Result<()>> {
future::ready(Ok(())).boxed()
}

fn push_tag(
&self,
_name: String,
_remote_name: String,
_ask_pass: AskPassDelegate,
_env: Arc<HashMap<String, String>>,
_cx: AsyncApp,
) -> BoxFuture<'_, Result<RemoteCommandOutput>> {
future::ready(Ok(RemoteCommandOutput {
stdout: String::new(),
stderr: String::new(),
}))
.boxed()
}

fn blame(
&self,
path: RepoPath,
Expand Down
Loading