Skip to content

Commit

Permalink
fix error when .gitmodules doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistonight committed Nov 29, 2023
1 parent d370a77 commit 3feb96d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "magoo"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
description = "A wrapper for git submodule that simplifies the workflows"
repository = "https://github.com/Pistonite/magoo"
license = "MIT"
authors = ["Pistonight <[email protected]>"]
keywords = ["git", "tool", "submodule"]
categories = ["development-tools"]
keywords = ["git", "tool", "submodule", "cli"]
categories = ["development-tools", "command-line-utilities"]
exclude = [
".github/**/*",
"README.txtpp.md",
Expand Down
3 changes: 2 additions & 1 deletion src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ impl Status {
let dot_gitmodules_path = top_level_dir.join(".gitmodules");

let config_entries =
Self::read_submodule_from_config(context, &dot_gitmodules_path.to_cmd_arg())?;
Self::read_submodule_from_config(context, &dot_gitmodules_path.to_cmd_arg())
.unwrap_or_default();

for (key, value) in config_entries {
let name = if let Some(name) = key.strip_suffix(".path") {
Expand Down

0 comments on commit 3feb96d

Please sign in to comment.