Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[advisories]
ignore = ["RUSTSEC-2024-0364"]
1 change: 0 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ pub enum Commands {
#[arg(short = 's', long = "shallow", default_value = "false", action = clap::ArgAction::SetTrue, default_missing_value = "true", help = "If given, sets the submodule as a shallow clone. It will only fetch the last commit of the branch, not the full history.")]
shallow: bool,

// TODO: Implement this arg
#[arg(long = "no-init", default_value = "false", action = clap::ArgAction::SetTrue, default_missing_value = "true", help = "If given, we'll add the submodule to your submod.toml but not initialize it.")]
no_init: bool,
},
Expand Down
20 changes: 10 additions & 10 deletions src/git_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ impl GitManager {
sparse_paths: Option<Vec<String>>,
branch: Option<SerializableBranch>,
ignore: Option<SerializableIgnore>,
fetch: Option<SerializableFetchRecurse>,
fetch_recurse: Option<SerializableFetchRecurse>,
update: Option<SerializableUpdate>,
shallow: Option<bool>,
no_init: bool,
Expand All @@ -419,9 +419,9 @@ impl GitManager {
branch: branch.clone(),
ignore: ignore.clone(),
update: update.clone(),
fetch_recurse: fetch.clone(),
fetch_recurse: fetch_recurse.clone(),
active: Some(true),
shallow: shallow,
shallow,
no_init: Some(no_init),
Comment on lines +421 to +425
sparse_paths: None,
},
Expand All @@ -441,9 +441,9 @@ impl GitManager {
branch: branch.clone(),
ignore: ignore.clone(),
update: update.clone(),
fetch_recurse: fetch.clone(),
fetch_recurse: fetch_recurse.clone(),
shallow: shallow.unwrap_or(false),
no_init: false,
no_init,
};
match self.git_ops.add_submodule(&opts).map_err(Self::map_git_ops_error) {
Ok(()) => {
Expand All @@ -454,12 +454,12 @@ impl GitManager {
SubmoduleEntry {
path: Some(path),
url: Some(url),
branch: branch,
ignore: ignore,
update: update,
fetch_recurse: fetch,
branch,
ignore,
update,
fetch_recurse,
active: Some(true),
shallow: shallow,
shallow,
no_init: Some(no_init),
sparse_paths: None, // stored separately via configure_submodule_post_creation
},
Expand Down
Loading