`--ref` is similar to `--branch`, but was renamed as it also supports tags for example.
Showing the changes to gitoxide-core/src (1 of 3 files). Show all
Unified · Split
| @@ -6,6 +6,7 @@ pub struct Options { · 5 unmodified lines | ||
| 6 | 6 | pub handshake_info: bool, |
| 7 | 7 | pub no_tags: bool, |
| 8 | 8 | pub shallow: gix::remote::fetch::Shallow, |
| 9 | + pub ref_name: Option<gix::refs::PartialName>, | |
| 9 | 10 | } |
| 10 | 11 | |
| 11 | 12 | pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=3; |
| @@ -31,6 +32,7 @@ pub(crate) mod function { · 19 unmodified lines | ||
| 31 | 32 | handshake_info, |
| 32 | 33 | bare, |
| 33 | 34 | no_tags, |
| 35 | + ref_name, | |
| 34 | 36 | shallow, |
| 35 | 37 | }: Options, |
| 36 | 38 | ) -> anyhow::Result<()> |
| @@ -75,6 +77,7 @@ pub(crate) mod function { · 38 unmodified lines | ||
| 75 | 77 | } |
| 76 | 78 | let (mut checkout, fetch_outcome) = prepare |
| 77 | 79 | .with_shallow(shallow) |
| 80 | + .with_ref_name(ref_name.as_ref())? | |
| 78 | 81 | .fetch_then_checkout(&mut progress, &gix::interrupt::IS_INTERRUPTED)?; |
| 79 | 82 | |
| 80 | 83 | let (repo, outcome) = if bare { |