mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Skip submodule update for fresh clones (#4482)
## Summary We unconditionally update the submodules in our Git code, but AFAICT it shouldn't be necessary if we already have a complete, up-to-date fetch available.
This commit is contained in:
parent
01515c1332
commit
7d3fb4330f
1 changed files with 5 additions and 8 deletions
|
@ -278,7 +278,6 @@ impl GitDatabase {
|
|||
Some(co) => co,
|
||||
None => GitCheckout::clone_into(destination, self, rev)?,
|
||||
};
|
||||
checkout.update_submodules()?;
|
||||
Ok(checkout)
|
||||
}
|
||||
|
||||
|
@ -414,12 +413,7 @@ impl GitCheckout {
|
|||
.cwd(&self.repo.path)
|
||||
.exec_with_output()?;
|
||||
|
||||
paths::create(ok_file)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Runs `git submodule update --recursive` on this git checkout.
|
||||
fn update_submodules(&self) -> Result<()> {
|
||||
// Update submodules (`git submodule update --recursive`).
|
||||
ProcessBuilder::new("git")
|
||||
.arg("submodule")
|
||||
.arg("update")
|
||||
|
@ -427,7 +421,10 @@ impl GitCheckout {
|
|||
.arg("--init")
|
||||
.cwd(&self.repo.path)
|
||||
.exec_with_output()
|
||||
.map(drop)
|
||||
.map(drop)?;
|
||||
|
||||
paths::create(ok_file)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue