mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Allow rev = "refs/..."
to use the GitHub fast path
This commit is contained in:
parent
361b11000a
commit
19bb1df226
@ -1029,9 +1029,13 @@ fn github_up_to_date(
|
||||
GitReference::Branch(branch) => branch,
|
||||
GitReference::Tag(tag) => tag,
|
||||
GitReference::DefaultBranch => "HEAD",
|
||||
GitReference::Rev(_) => {
|
||||
debug!("can't use github fast path with `rev`");
|
||||
return Ok(false);
|
||||
GitReference::Rev(rev) => {
|
||||
if rev.starts_with("refs/") {
|
||||
rev
|
||||
} else {
|
||||
debug!("can't use github fast path with `rev = \"{}\"`", rev);
|
||||
return Ok(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user