Closed tohanss closed 4 years ago
I think this is the error:
[ERROR] GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git commit -m 'Sanitize files'
stdout: 'On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean'
In this case, i got this while trying to test sanitizing my solutions branch. Which just tells me theres no diff and i did something right, meaning master in untouched
One way to solve this would be to check if there is a diff between the staged version and the previous commit, before trying to commit. In other words:
git diff --staged
With git-python, it should probably translate to repo.git.diff("--staged")
.
I believe there was a bug before when we tested sanitizing to the master branch. If there was no difference between master and the sanitized solutions sanitizer would crash/break/complain. There was no issue created for this and therefore we should test it to see if it is still a problem.