Missing features / edge-case handling in gitoxide compared to native git client #2810
Sampo Kivistö (Havunen)
started this conversation in
Oxidize
Replies: 1 comment
|
Thanks for the feedback! Can you add a checklist to the issue, maybe even in a tree structure? PS: I wish LLMs would stop writing like them, I want to throw up when I see 'gap' and 'wedge' these days 🤦♂️. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey,
We are implementing GitComet https://github.com/Auto-Explore/GitComet - Rust based Git GUI and under the hood we would like to utilize gitoxide as much as possible. However, there are certain functionality that has not been implemented as well as certain edge case handling that are missing so we had to fallback native system git binary instead.
This is AI generated analysis of the missing features. It would be awesome if these issues can be implemented.
GitComet gix migration gaps
This is the current inventory of production
gitsubprocess behavior thatprevents GitComet from using the
gixlibrary alone. It was reviewed againstGitComet
bf048db2and the local gitoxide checkout2315ede71(gix 0.85.0).It is deliberately an API and behavior inventory, not a count of
Command::new("git")literals. Most backend commands are created byGixRepo::git_workdir_cmd()incrates/gitcomet-git-gix/src/repo/mod.rs; a literal-only scoreboard does notmeasure the real migration surface.
Scope and terminology
Included: every production subprocess in the repository backend, clone
effect, setup/uninstall mode, standalone difftool mode, and CLI configuration
lookup. Test fixtures, integration tests, and
perf_app_launchare excludedfrom the runtime blocker list.
Each entry is classified as one of:
GitComet enables
max-performance-safe,comfort,basic,auto-chain-error,status,blame, andsha1(
Cargo.toml). It does not enableblocking-network-clientorworktree-mutation. The two missing featuregroups are important constraints, not upstream gix gaps.
Current gix capabilities that should not be listed as missing
The previous inventory overstated several gaps. These are present in public
gix APIs, although a replacement still needs GitComet implementation and
parity tests.
gix::init()/gix::init_bare()git initblocker.Repository::config_snapshot_mut(),SnapshotMut::{set_value,append_config,commit}andgix_config::FilemutationRepository::head(),rev_parse_single(),merge_base()symbolic-ref,rev-parse, andmerge-base --is-ancestorafter preserving their corrupt/unborn-HEAD error behavior.Repository::tag()Remote::{save_to,save_as_to,with_url,with_push_url}plus config mutationRepository::worktrees()/ worktree proxiesgit worktree list --porcelain -z; creating or deleting linked worktrees is still missing.for-each-ref; GitComet already has a gix fallback for branch divergence. A batch implementation and caching are needed for large repositories.gix-indexentry mutation and index writinggit add/git rmworkflow that hashes worktree data, applies filters/ignores, updates stat data, resolves conflicts, and commits the index safely.Evidence:
gitoxide/gix/src/lib.rs,repository/config/,repository/object.rs,repository/reference.rs,repository/revision.rs,repository/worktree.rs,remote/{build,save}.rs, andgix-index/src/access/mod.rs.Highest-priority blockers
1. Push and remote writes - upstream workflow gap
Consumers:
repo/remotes.rs,repo/tags.rs.GitComet uses
push,--set-upstream, implicit and explicit--force-with-lease,--delete, normal refspecs, and tag push/delete. gixdoes not provide push plumbing:
gix-protocol::Commandcurrently exposesLsRefsandFetch, not send-pack/receive-pack.crate-status.mdstillmarks push as incomplete.
Required upstream behavior:
atomic updates, and push options;
The important user-visible cases are a stale explicit lease, a missing remote
branch, a
HEAD:refs/heads/<branch>source, deleting remote branches/tags,and preserving rejected-ref diagnostics.
2. Network access and fetch persistence - feature gate plus upstream gap
Consumers:
repo/remotes.rs,repo/tags.rs, clone effect.gix supports clone/fetch/ls-refs plumbing, but GitComet has no
network-client feature enabled. Enabling
blocking-network-client(and achosen HTTP transport) is a GitComet dependency/configuration change.
Even then, GitComet cannot directly replace its safe-push fetch:
FETCH_HEAD(crate-status.md);--no-tags --refmap=and thenresolves
FETCH_HEAD^{commit};fetch --alland prune behavior need application orchestration andGit-compatible remote/refspec choices;
ssh,git, andfilefetches may hang(
SHORTCOMINGS.md).Do not describe push as a prerequisite for pull. Fetch plus either merge or
rebase is the dependency chain; push is independent remote-write work.
3. Checkout, reset, restore, and clean - feature gate plus upstream workflow gap
Consumers:
repo/porcelain.rs,repo/history.rs,repo/discard.rs,repo/blame.rs,repo/submodules.rs.GitComet runs branch and detached checkout, tracking-branch checkout,
soft/mixed/hard reset, path restore, conflict-side/base checkout, removal of
staged additions, path-scoped clean, and forced submodule restore.
worktree-mutationis not enabled, so GitComet currently cannot use thelow-level checkout facilities. More importantly, gitoxide still marks
checkout/switch/restore/reset orchestration as incomplete. A safe replacement
must compose refs,
HEAD, index, worktree writes, clean/smudge filters,conflict stages,
ORIG_HEAD, sparse/worktree configuration, and overwriteprotection. Path-scoped discard must continue to distinguish tracked,
untracked, staged-added, conflicted, and submodule paths exactly as
discard_worktree_changes_impl()does.4. Index-to-worktree porcelain - upstream workflow gap
Consumers: staging, unstage, mergetool completion, conflict-side/base
checkout, submodule pointer changes, and deletion in
porcelain.rs,mergetool.rs,blame.rs, andsubmodules.rs.The missing item is not low-level index mutation. It is a supported
repository-level add/remove/resolve workflow:
add -A;Until that exists,
git add,git rm,git rm --cached, and theirpath-batching behavior remain subprocesses. The consumers should remain one
shared gap, not separate duplicate gaps.
5. Sequencer and merge workflows - upstream workflow gap
Consumers:
repo/history.rs,repo/porcelain.rs,repo/remotes.rs.GitComet has grown beyond a simple
rebase --continuewrapper. It supportsinteractive rebase state, reword/squash/fixup/drop planning, merge-mainline
cherry-picks,
--no-commit, automatic skipping of truly empty picks, andcareful distinction between conflict pauses and hook/signer failures. It also
uses merge, squash merge, and abort paths.
gix has merge-base and low-level merge plumbing, but the
mergefeature isnot enabled in GitComet and gitoxide still marks merge, rebase,
cherry-pick/revert, and their persisted/resumable workflows incomplete.
Required behavior includes:
MERGE_HEAD,MERGE_MSG,MERGE_MODE,ORIG_HEAD, continue, and abort;from existing Git-created state;
The special
git commit-treeplus compare-and-swapgit update-refsquashpath in
history.rsis also part of this group: public commit/ref primitivesexist, but preserving signing, hooks, reflogs, and atomic expected-old updates
requires a deliberate GitComet composition or a higher-level API.
6. Stash, mailbox patches, and patch application - upstream workflow gap
Consumers:
repo/porcelain.rs,repo/patch.rs.GitComet uses stash push with optional untracked files, apply with a
preflight, and drop. It also exports
format-patch, applies mailbox patcheswith
am --3way, and applies/reverses unified patches to either the index orworktree using
--recount --whitespace=nowarn.Gitoxide still marks stash,
am, andapplyworkflow composition asincomplete. Required work includes stash commit/reflog construction, optional
untracked parent handling, preflight overwrite checks, three-way conflict
state, textual and binary patch parsing/application, mailbox metadata, and
index/worktree destinations.
format-patchadditionally needs stableemail-style headers and Git binary-patch output.
7. Worktree and submodule mutation - upstream workflow gap
Consumers:
repo/worktrees.rs,repo/submodules.rs,repo/discard.rs.gix can list worktrees and read/enumerate submodules; it cannot create,
remove, move, repair, or prune linked worktrees. It also lacks submodule
editing and lifecycle workflows.
GitComet's submodule path is broader than the old inventory recorded:
submodule addwith branch/name/force;.git/modulesplus localconfig;
A gix replacement must preserve these trust checks, recursive behavior,
.gitmodulesand local-config updates, gitlink index updates, nested clone/fetch/checkout, and cleanup on failure.
Important secondary gaps
git commit,--amendinporcelain.rscrate-status.md.git blame --line-porcelain [--contents -]inblame.rsRepository::blame_file()handles committed content. There is no public arbitrary-content/worktree blame that produces virtual “not committed yet” attribution and follows historical paths.git log --follow,diff-tree -Minlog.rsdiff,show, commit-range output, and submodule--numstat/--name-statussummaries indiff.rsandsubmodules.rsgit cat-file blob <oid>preview streaming indiff.rstags.rsfor-each-ref; avoid one expensive walk per branch.status.rsProduction subprocesses outside the repository backend
crates/gitcomet-state/src/store/effects/clone.rsgit clone --progresscrates/gitcomet/src/setup_mode.rsgit configglobal/local get, set, add, unsetcrates/gitcomet/src/cli/git_config.rsgit config --get,rev-parse --show-toplevelcrates/gitcomet/src/difftool_mode.rsgit diff --no-index --no-ext-diffExcluded process uses
The following are not runtime blockers and must not be counted against the
gix migration inventory:
gitcomet-git-gixintegration/unit tests and tests under other crates;extract_fixtures_mode.rs;perf_app_launchrepository-fixture creation;repo_monitor.rsand clone tests.Recommended migration order
ancestry fallbacks, worktree listing, local tag operations, branch safe
delete composition, config section cleanup, and selected configuration
lookups. Add parity tests before each removal.
worktree-mutationfor narrow, safe checkout/restore experiments. Keep destructive reset, clean, and submodule restore
behind explicit parity coverage.
Prototype fetch and ls-refs with GitComet's progress/cancellation/auth
requirements; do not migrate safe-push until
FETCH_HEADis avoided orupstream support exists.
sequencer/merge state, stash/apply, worktree/submodule mutation, hooks,
and push.
non-repository difftool as GitComet composition projects, contributing
upstream APIs only where repeated application code exposes a genuine
library boundary.
Source checklist
The inventory was reconciled against these GitComet call sites:
crates/gitcomet-git-gix/src/repo/{porcelain,history,remotes,tags,worktrees, submodules,discard,diff,blame,log,patch,mergetool,status,git_ops}.rscrates/gitcomet-state/src/store/effects/clone.rscrates/gitcomet/src/{setup_mode,difftool_mode}.rscrates/gitcomet/src/cli/git_config.rsKey gitoxide evidence:
crate-status.md- workflow, remote, worktree, config, and hook status;SHORTCOMINGS.md- protocol-v1 stateful-fetch limitation;gix/src/{lib,clone,remote,repository,reference,worktree}.rs;gix-index/src/access/mod.rsandgix-config/src/file/access/mutate.rs.All reactions