Skip to content
Merged
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
5 changes: 2 additions & 3 deletions src/git.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! This module abstracts the git functionality needed to make `embd` work so that
//! the tool can continue to work whether a global git executable is available or not.
//! Note that currently, git is required.

use anyhow::{Context, Result, bail};
use url::Url;
Expand Down Expand Up @@ -55,9 +56,7 @@ fn validate_repo_name(name: &str) -> Result<()> {
let mut chars = name.chars();
let first = chars.next().unwrap();
if !(first.is_ascii_alphanumeric() || first == '_') {
bail!(
"repo name '{name}' must start with an ASCII letter, digit, or underscore"
);
bail!("repo name '{name}' must start with an ASCII letter, digit, or underscore");
}
for c in chars {
if !(c.is_ascii_alphanumeric() || c == '_' || c == '-' || c == '.') {
Expand Down