OctoPrint-GitFiles


#1

So, this plugin is pretty cool and I love the idea! I just don't like that it uses a github folder under the root of uploads. I'd prefer to have it checkout my repo into the uploads root...

Seems like a pretty easy change to the plugin, so I was considering adding a configuration option for this and submitting a PR. FormerLurker that created Octolapse told me about the plugin and suggested I post here about this.

So -

Does anyone know if there's a reason checking out the repo into the root uploads would be a problem?

Does anyone know if the author would be open to accepting my PR if I put one in?


#2

Hey, I'm the author of that and I usually camp out here on the forum as well.

I put some notes in the PR but I'll add them here, too.

Imagine this workflow:

  • empty uploads folder
  • add the plugin
  • create the repository and do the git pull behind-the-scenes
  • upload a file using the Files manager (especially one that already exists by name)
  • attempt to do another git pull by pushing the button

At this point, the git command line just goes to the log and things are pretty messed up without any easy way to fix it unless you intimately know git commands (which you and I probably do).

I wanted this to be super-simple for git noobs. (I'm a former software development instructor so I know that merge events are difficult for some.) By carving out a safe/dedicated folder like github or similar, it's a reminder that the user shouldn't be uploading files here since that's messy. But it still permits the user (like myself) to just upload and print a file that wouldn't be in the git workflow.

And yes, I'm open to PRs. I'll run it through its paces to make sure that it's happy on the various platforms that it's supposed to support. I found that OctoPrint doesn't seem to want to walk a symlink for whatever reason so I've had to do more testing than what I would have otherwise expected.


#3

Thanks to a pair of PRs and some work this week, a new v1.1.4 version is now available. If you installed the earlier version and needed some hand-holding for the upgrade, let me know.