mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 04:06:38 +08:00
Fix git source kept reupdating for using non default branch
This commit is contained in:
parent
05c0f80156
commit
589e939d84
@ -273,7 +273,7 @@ pub fn fetch(recipe: &CookRecipe, check_source: bool, logger: &PtyOut) -> Result
|
||||
match get_git_fetch_rev(
|
||||
&source_dir,
|
||||
&remote.remote_url,
|
||||
&remote.remote_branch,
|
||||
branch.as_ref().unwrap_or(&remote.remote_branch),
|
||||
) {
|
||||
Ok(fetch_rev) => fetch_rev == head_rev,
|
||||
Err(e) => {
|
||||
@ -322,6 +322,7 @@ pub fn fetch(recipe: &CookRecipe, check_source: bool, logger: &PtyOut) -> Result
|
||||
} else {
|
||||
let branch = match branch {
|
||||
Some(branch) => branch.clone(),
|
||||
// TODO: Reuse default branch name from get_git_remote_tracking?
|
||||
None => get_git_remote_branch(&source_dir, "origin")?,
|
||||
};
|
||||
let mut command = Command::new("git");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user