aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-02-19 05:52:36 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commita229f405cc0d9690fc9ceca99fce0832b3e060ab (patch)
tree54af02185d11e0b21f090f359d1bc9e031854407
parent31b7596f093c313bc88867f3ba2ae9813f7c55d4 (diff)
shallow clone
-rw-r--r--helix-loader/src/grammar.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs
index 4fe7fd04..a0aa9583 100644
--- a/helix-loader/src/grammar.rs
+++ b/helix-loader/src/grammar.rs
@@ -129,7 +129,7 @@ where
// TODO: print all failures instead of the first one found.
rx.iter()
.find(|result| result.is_err())
- .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
+ .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
.unwrap_or(Ok(()))
}
@@ -162,7 +162,10 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {
// Fetch the exact revision from the remote.
// Supported by server-side git since v2.5.0 (July 2015),
// enabled by default on major git hosts.
- git(&grammar_dir, ["fetch", REMOTE_NAME, &revision])?;
+ git(
+ &grammar_dir,
+ ["fetch", "--depth", "1", REMOTE_NAME, &revision],
+ )?;
git(&grammar_dir, ["checkout", &revision])?;
println!(