Skip to content

Commit f749b46

Browse files
committed
fix: ensure vendored grammar is in a clean state
1 parent f2ba0f5 commit f749b46

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

helix-loader/src/grammar.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<FetchStatus> {
300300
&grammar_dir,
301301
["fetch", "--depth", "1", REMOTE_NAME, &revision],
302302
)?;
303+
git(&grammar_dir, ["reset", "--hard"])?;
304+
git(&grammar_dir, ["clean", "-fdx"])?;
303305
git(&grammar_dir, ["checkout", &revision])?;
304306

305307
Ok(FetchStatus::GitUpdated { revision })

0 commit comments

Comments
 (0)