-
-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use crate::OutputFormat; | ||
use git::bstr::BString; | ||
use git_repository as git; | ||
|
||
pub struct Options { | ||
pub format: OutputFormat, | ||
pub dry_run: bool, | ||
pub remote: Option<String>, | ||
/// If non-empty, override all ref-specs otherwise configured in the remote | ||
pub ref_specs: Vec<BString>, | ||
} | ||
|
||
pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=2; | ||
|
||
pub(crate) mod function { | ||
#![allow(unused_variables, unused_mut)] | ||
use super::Options; | ||
use git_repository as git; | ||
|
||
pub fn fetch( | ||
repo: git::Repository, | ||
mut progress: impl git::Progress, | ||
mut out: impl std::io::Write, | ||
err: impl std::io::Write, | ||
Options { | ||
format, | ||
dry_run, | ||
remote, | ||
ref_specs, | ||
}: Options, | ||
) -> anyhow::Result<()> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters