Skip to content

feat: add Repository::reopen() as quick way to reload all configuration and drop caches.#2469

Merged
Byron merged 1 commit intomainfrom
improvements
Mar 14, 2026
Merged

feat: add Repository::reopen() as quick way to reload all configuration and drop caches.#2469
Byron merged 1 commit intomainfrom
improvements

Conversation

@Byron
Copy link
Member

@Byron Byron commented Mar 14, 2026

No description provided.

@Byron Byron requested a review from Copilot March 14, 2026 01:04
@Byron
Copy link
Member Author

Byron commented Mar 14, 2026

@codex review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Repository::reload() method that allows users to re-open a repository in place, refreshing all Git configuration from disk, dropping caches, and releasing system resources. It works by re-opening the repository using the stored open options with open_path_as_is(true) to avoid path discovery.

Changes:

  • Added reload(&mut self) method on Repository in gix/src/repository/init.rs that re-opens the repository from disk
  • Updated documentation on config_snapshot() and config_snapshot_mut() to cross-reference the new reload() method
  • Added two tests verifying that reload() picks up on-disk config changes and discards in-memory-only edits

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
gix/src/repository/init.rs New reload() method that re-opens the repository using stored options
gix/src/repository/config/mod.rs Doc updates on config_snapshot() and config_snapshot_mut() referencing reload()
gix/tests/gix/repository/config/config_snapshot/mod.rs Two new tests for reload(): on-disk changes and in-memory discard

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbb2e85b0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…tion and drop caches.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
@Byron
Copy link
Member Author

Byron commented Mar 14, 2026

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Byron Byron merged commit 26d5197 into main Mar 14, 2026
30 checks passed
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.

2 participants