-
Notifications
You must be signed in to change notification settings - Fork 5
Provide fast variants of operations #7
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
Comments
Looks like branchless uses this for
The basic idea for this is to create internal-only commits that restrict processing to the changed paths.
|
Please feel free to copy any amount of code directly from git-branchless. The executable as a whole is licensed under GPL-3 because it uses a GPL library, but I'm happy to license all code under MIT+Apache. I'd also recommend you copy the appropriate benches: https://github.com/arxanas/git-branchless/blob/85692c507a672f7c0df9f65436ed80f441bf308c/benches/benches.rs#L83-L118
Yes, that's correct. The patch's parent commit should be dehydrated so that the diff is correct, i.e. it doesn't report a million deletion operations. The target commit's parent doesn't need to be touched because it's not diffing the target commit. A better API might be to have the user pass the parent commit explicitly. That would also be helpful for implementing squashes, etc.
I haven't looked explicitly, but I think it's pretty much always faster. The index data structure always requires a linear scan to write all the objects and build the trees, which requires a bunch of potentially-spurious memory allocations and disk writes, whereas the |
I haven't tested this, but I expect it would be no slower via |
Huh, I realized this won't quite work for the current algorithm that git2-ext uses. I based squash and cherry-pick off of rebase to reduce the chance of conflicts since rebase will automatically go through and check for when things apply cleanly. |
README.md list indentation and no bare URLs, as per Markdown Lint VS Code extension
See https://github.com/arxanas/git-branchless/blob/a4bc3c0c31b7be5cdd95ed8cfe4385e384482a99/src/git/repo.rs#L914-L924
The text was updated successfully, but these errors were encountered: