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

cli: Refactor a reusable git_fetch function from the command. #4767

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

essiene
Copy link
Collaborator

@essiene essiene commented Nov 4, 2024

We will need this in the jj git sync command to perform a fetch that behaves
the same as the jj git fetch command.

  • Refactor out git_fetch and move it to git_util.rs
  • Also move warn_if_branches_not_found. It is only used by git_fetch
  • Move map_git_error to git_util.rs and update other call sites to import correctly.
  • Update using statements as needed.

All tests still pass as this is a noop.

Part of: #1039

@essiene essiene force-pushed the essiene/vutlmutyytky branch 3 times, most recently from 3a16b88 to d6df47f Compare November 4, 2024 21:15
@essiene essiene changed the title git fetch: Refactor a reusable git_fetch function from the command. cli: Refactor a reusable git_fetch function from the command. Nov 4, 2024
@essiene essiene force-pushed the essiene/vutlmutyytky branch from d6df47f to 4a4ac40 Compare November 4, 2024 21:22
@essiene essiene requested a review from yuja November 4, 2024 21:24
cli/src/git_util.rs Outdated Show resolved Hide resolved
@essiene essiene force-pushed the essiene/vutlmutyytky branch from 4a4ac40 to f4b6e5b Compare November 5, 2024 12:09
We will need this in the `jj git sync` command to perform a fetch that behaves
the same as the `jj git fetch` command.

* Refactor out `git_fetch` and move it to `git_util.rs`
* Also move `warn_if_branches_not_found`. It is only used by `git_fetch`
* Move `map_git_error` to `git_util.rs` and update other call sites to import correctly.
* Update using statements as needed.

All tests still pass as this is a noop.

Part of: #1039
@essiene essiene force-pushed the essiene/vutlmutyytky branch from f4b6e5b to 1b5a5c0 Compare November 5, 2024 12:27
@essiene essiene merged commit 8588983 into main Nov 5, 2024
31 checks passed
@essiene essiene deleted the essiene/vutlmutyytky branch November 5, 2024 12:47
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