-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor:improve checkpoint and ensure gc to improve disk space #3695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
refactor:improve checkpoint and ensure gc to improve disk space #3695
Conversation
|
@gauravsaini would you be able to convert the PR to draft and generate and link to an issue please? |
e72e069
to
43387b1
Compare
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@hannesrudolph |
@cte would you be able to review this before it gets outdated? Looks promising. |
Hey @gauravsaini, thank you for your contribution, I really like your implementation. Since they don't add useful information to the code itself. |
// Copied | ||
filesToAdd.push(filePath) // Add the new path | ||
} | ||
// Other statuses like 'U' (unmerged) might need specific handling if relevant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gauravsaini, quick thought on the new stageAll
logic: how does it handle files that were part of a merge conflict and have been resolved in the working directory but not yet git add
ed? The if/else
chain doesn't seem to explicitly cover 'U' (unmerged) statuses. Just wondering if this might mean resolved conflicts aren't always included in checkpoints?
Question: Can It would be extremely useful for the out-of-band per-workspace git tree, (ie, AI profiles could be given instructions to work with that repository to see and integrate into the existing main repository, mostly for cherry picks because it is only a partial file tree, but maybe other options as well. Here are some other really cool ideas (o4-mini). I especially like the feature that provide to ask the AI things like
|
Related GitHub Issue
Closes #3391
Closes #3348
Closes #3080
Description
Garbage collection and perf improvements
Upgrade to git 2.49.0 for additional benefits
Test Procedure
Unit tests added
Sanity test on local
Type of Change
src
or test files.Pre-Submission Checklist
npm run lint
).console.log
) has been removed.npm test
).main
branch.npm run changeset
if this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Important
Refactor
ShadowCheckpointService
to improve performance and disk space management by caching nested git paths, optimizing file staging, and introducing garbage collection.ShadowCheckpointService
to avoid repeated scans.stageAll()
to usegit status
for specific file changes instead ofgit add .
.renameNestedGitRepos()
to use cached paths.git repack
during initialization if a shadow repo exists.git gc
after every 20 checkpoints insaveCheckpoint()
.git gc --prune=now
after deleting a branch indeleteBranch()
.getDiff()
to usegit diff --name-status
for precise change tracking and handle file content retrieval more accurately.This description was created by
for e72e069. You can customize this summary. It will automatically update as commits are pushed.