mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 09:31:16 -03:00
committed by
Johannes Altmanninger
parent
e1be842167
commit
67e95a1ce7
2
build.rs
2
build.rs
@@ -327,7 +327,7 @@ fn get_git_hash() -> Result<String, Box<dyn std::error::Error>> {
|
||||
// .git/HEAD contains ref: refs/heads/branch
|
||||
let headpath = gitdir.join("HEAD");
|
||||
let headstr = read_to_string(headpath)?;
|
||||
let headref = headstr.split(' ').collect::<Vec<_>>()[1].trim();
|
||||
let headref = headstr.split(' ').nth(1).unwrap().trim();
|
||||
|
||||
// .git/refs/heads/branch contains the SHA
|
||||
let refpath = gitdir.join(headref);
|
||||
|
||||
Reference in New Issue
Block a user