mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Trim commits when reading from Git refs (#7922)
## Summary Closes #7919.
This commit is contained in:
parent
b23feebb6d
commit
d80139698d
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ impl CacheCommit {
|
|||
})?;
|
||||
let commit = if let Some(git_ref) = git_ref_parts.next() {
|
||||
let git_ref_path = git_dir.join(git_ref);
|
||||
fs_err::read_to_string(git_ref_path)?
|
||||
let commit = fs_err::read_to_string(git_ref_path)?;
|
||||
commit.trim().to_string()
|
||||
} else {
|
||||
commit_or_ref.to_string()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue