Skip to content
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

Use dyn where possible, including dyn based progress traits #1008

Merged
merged 4 commits into from
Sep 6, 2023
Merged

Conversation

Byron
Copy link
Member

@Byron Byron commented Sep 4, 2023

Implement a proper worktree reset, eventually leading to a high-level reset similar to how git supports it.

Facilitate compile time reduction

  • upgrade to latest Prodash
  • See if users of Progress can also use Count or dyn Count, or dyn Progress
  • review all crates for unnecessary usage of generics
  • split gix-pack data-io off using feature toggles
  • Add gix feature toggles: remote-connection, blob-diff, describe, attributes->worktree-checkout, attribute->pathspecs->submodules, mailmap
  • security: assure we don't read outside of the repository when refs are ../../../. Further, assure that we don't write such refs when receiving them from the server.

Tasks

  • upgrade to
  • worktree reset to match new index, with or without safety checks to prevent overwriting modified files or untracked files.
  • figure out how this relates to the current checkout() method as technically that's a reset --hard with optional overwrite check. Could it be rolled into one, with pathspec support added?
  • TBD

Postponed

What follows is important for resets, but won't be needed for cargo worktree resets.

  • insert entry into index
  • traverse tree with pathspec matching and insert entry into index.

Research

  • How to integrate submodules
  • How to deal with various modes like merge and keep? How to control refresh?
  • Worthwhile to make explicit the difference between git reset and git checkout in terms of HEAD modifications. With the former changing HEADs referent, and the latter changing HEAD itself.

@Byron Byron force-pushed the reset branch 2 times, most recently from 70e8e77 to 05d3e82 Compare September 4, 2023 16:40
It makes proper usage of `Progress` types easier and allows them to be used
as `dyn` traits as well.
@Byron Byron force-pushed the reset branch 2 times, most recently from d93311d to 50b7360 Compare September 4, 2023 20:13
…ng is performed, in place of `prodash::Progress`
@Byron Byron force-pushed the reset branch 2 times, most recently from 8ba2cfc to 2c5d28b Compare September 5, 2023 19:47
@Byron Byron mentioned this pull request Sep 6, 2023
3 tasks
@Byron Byron force-pushed the reset branch 6 times, most recently from c1c88fd to a0be01c Compare September 6, 2023 14:14
This reduces compile time due to avoiding duplication.
@Byron Byron merged commit 072ee32 into main Sep 6, 2023
18 checks passed
@Byron Byron mentioned this pull request Sep 6, 2023
10 tasks
@Byron Byron changed the title worktree reset Use dyn where possible, including dyn based progress traits Sep 7, 2023
This was referenced Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant