Skip to content

Commit bbb4cb0

Browse files
committed
add group headings to all shallow-related arguments.
1 parent 42cf806 commit bbb4cb0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: src/plumbing/options/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -166,23 +166,23 @@ pub mod fetch {
166166
#[derive(Debug, clap::Parser)]
167167
pub struct ShallowOptions {
168168
/// Fetch with the history truncated to the given number of commits as seen from the remote.
169-
#[clap(long, conflicts_with_all = ["shallow_since", "shallow_exclude", "deepen", "unshallow"])]
169+
#[clap(long, help_heading = Some("SHALLOW"), conflicts_with_all = ["shallow_since", "shallow_exclude", "deepen", "unshallow"])]
170170
pub depth: Option<NonZeroU32>,
171171

172172
/// Extend the current shallow boundary by the given amount of commits, with 0 meaning no change.
173-
#[clap(long, value_name = "DEPTH", conflicts_with_all = ["depth", "shallow_since", "shallow_exclude", "unshallow"])]
173+
#[clap(long, help_heading = Some("SHALLOW"), value_name = "DEPTH", conflicts_with_all = ["depth", "shallow_since", "shallow_exclude", "unshallow"])]
174174
pub deepen: Option<u32>,
175175

176176
/// Cutoff all history past the given date. Can be combined with shallow-exclude.
177-
#[clap(long, value_parser = crate::shared::AsTime, value_name = "DATE", conflicts_with_all = ["depth", "deepen", "unshallow"])]
177+
#[clap(long, help_heading = Some("SHALLOW"), value_parser = crate::shared::AsTime, value_name = "DATE", conflicts_with_all = ["depth", "deepen", "unshallow"])]
178178
pub shallow_since: Option<gix::date::Time>,
179179

180180
/// Cutoff all history past the tag-name or ref-name. Can be combined with shallow-since.
181-
#[clap(long, value_parser = crate::shared::AsPartialRefName, value_name = "REF_NAME", conflicts_with_all = ["depth", "deepen", "unshallow"])]
181+
#[clap(long, help_heading = Some("SHALLOW"), value_parser = crate::shared::AsPartialRefName, value_name = "REF_NAME", conflicts_with_all = ["depth", "deepen", "unshallow"])]
182182
pub shallow_exclude: Vec<gix::refs::PartialName>,
183183

184184
/// Remove the shallow boundary and fetch the entire history available on the remote.
185-
#[clap(long, conflicts_with_all = ["shallow_since", "shallow_exclude", "depth", "deepen"])]
185+
#[clap(long, help_heading = Some("SHALLOW"), conflicts_with_all = ["shallow_since", "shallow_exclude", "depth", "deepen"])]
186186
pub unshallow: bool,
187187
}
188188

@@ -241,15 +241,15 @@ pub mod clone {
241241
#[derive(Debug, clap::Parser)]
242242
pub struct ShallowOptions {
243243
/// Create a shallow clone with the history truncated to the given number of commits.
244-
#[clap(long, conflicts_with_all = ["shallow_since", "shallow_exclude"])]
244+
#[clap(long, help_heading = Some("SHALLOW"), conflicts_with_all = ["shallow_since", "shallow_exclude"])]
245245
pub depth: Option<NonZeroU32>,
246246

247247
/// Cutoff all history past the given date. Can be combined with shallow-exclude.
248-
#[clap(long, value_parser = crate::shared::AsTime, value_name = "DATE")]
248+
#[clap(long, help_heading = Some("SHALLOW"), value_parser = crate::shared::AsTime, value_name = "DATE")]
249249
pub shallow_since: Option<gix::date::Time>,
250250

251251
/// Cutoff all history past the tag-name or ref-name. Can be combined with shallow-since.
252-
#[clap(long, value_parser = crate::shared::AsPartialRefName, value_name = "REF_NAME")]
252+
#[clap(long, help_heading = Some("SHALLOW"), value_parser = crate::shared::AsPartialRefName, value_name = "REF_NAME")]
253253
pub shallow_exclude: Vec<gix::refs::PartialName>,
254254
}
255255

0 commit comments

Comments
 (0)