repobee / repobee-sanitizer

A plugin for sanitizing master repositories before distribution to students
MIT License
2 stars 3 forks source link

Can not sanitize simple git repos #112

Closed tohanss closed 4 years ago

tohanss commented 4 years ago

Right now, because of how we check if something is a git repo, simply running git init on an empty folder and committing some files to it is not enough for repobee-sanitizer to recognize the folder as a valid git repo

slarse commented 4 years ago

What exactly is the problem? The check_repo_state function will pass just fine if you have only a single commit. Granted, there will be a crash if you don't have any commits at all, and perhaps that should be fixed, but an empty repo cannot be sanitized anyway.

tohanss commented 4 years ago

I made a repo with git init, but some files in it, and committed. Got an error saying that it was not a proper git repo. I dont know exactly what it said but im guessing it came from the gitpython library

slarse commented 4 years ago

I can't reproduce that. Could you give me a step-by-step of what you did?

tohanss commented 4 years ago

This works now! I think i must have had a repo without any commits even though I thought i had at the time.