Skip to content

Commit 6626844

Browse files
committed
fix: ensure repository is reset to the correct revision during fetch
Signed-off-by: Frost Ming <me@frostming.com>
1 parent 244bb36 commit 6626844

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/unearth/vcs/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def fetch_new(
6868
else:
6969
revision = self.get_revision(location)
7070
logger.info("Resolved %s to commit %s", url, revision)
71+
self.run_command(["reset", "--hard", "-q", revision], cwd=location)
7172
self._update_submodules(location)
7273

7374
def _update_submodules(self, location: Path) -> None:

0 commit comments

Comments
 (0)