Skip to content

Commit

Permalink
fix: changed undo commit strategy to stop file deletion during failed…
Browse files Browse the repository at this point in the history
… submit process
  • Loading branch information
florian-jaeger committed Dec 19, 2024
1 parent 3a78087 commit 72ebec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grader_labextension/services/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def go_to_commit(self, commit_hash):

def undo_commit(self, n: int = 1) -> None:
self.log.info(f"Undoing {n} commit(s)")
self._run_command(f"git reset --hard HEAD~{n}", cwd=self.path)
self._run_command(f"git reset --mixed HEAD~{n}", cwd=self.path)
self._run_command(f"git gc", cwd=self.path)

def revert(self, commit_hash: str):
Expand Down

0 comments on commit 72ebec7

Please sign in to comment.