Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Butler and git repositories

A topic by Jeroen P. Broks created Jan 26, 2021 Views: 753 Replies: 10
Viewing posts 1 to 4
(+1)

I am currently working on a small project in which all files that are now in my github repository are actually the same as that I would be distributing here on itch.io, if I would ever release it here (depends on how things go there). Now what I wonder this this. We all know that git relies on data stored in the secret .git folder. Since I see no need to have that folder distributed here on itch, I wonder, does when I just use butler to push that project to itch.io see that .git folder pushing it up here as well, or is butler sophisticated enough to ignore that secret .git folder?

Moderator(+2)

I just tried it manually and it seems to ignore the .git directory. I think it’s safe to assume it ignores all “hidden directories” (ones starting with a period ‘.’). I tried this on Linux, not sure if it works differently on other platforms.

I’d suggest you try it yourself, to confirm in your current setup if it works the same way. You can do this by going to an empty folder and initialising a git project (git init) then push that folder with butler, and download the uploaded zip file. In my case, the zip file was empty.

Thank you. Now my primary system is currently Windows 10, since sine Windows uses the "h" attribute to hide files I should (I guess) sort out of butler takes this into account, although in my many years that I was a Mac user and thus in a Unix environment I've gone to like the Unix approach to many things more... All my own programs consider the . prefix as hidden now, but that doesn't mean others follow suit.
Since I guess butler was written in Go if I wasn't mistaken, I guess it will work the same in Windows.... Thank you for trying this out for me ;)

(+1)

From looking at the butler github repo, looks to me like it's using this filter list in https://github.com/itchio/lake/blob/master/tlc/walk.go

var baseIgnoredPaths = []string{ ".git", ".hg", ".svn", ".DS_Store", "__MACOSX", "._*", "Thumbs.db", ".itch",
}
(+1)

Ah, yeah, I had be looking that up and couldn't find it (but going to other people's source without knowing their coding style can quite often lead astray), and that line was exactly what I wanted to see... Thanks a lot!

(+1)

I've never looked at go code before (now I'm king of interested!), but I scanned the butler repo and saw filtering.go. I was looking at the CustomIgnorePatterns variable at first but eventually realized that's the command-line option and the PresetFilter function must be imported from the lake repo listed at top. Reading code is such a rabbit hole!

(+1)

"Rabbit hole"... Yeah I guess so... Even when I dig through my own code when I haven't touched it in years I am always baffled... So let alone when I look through other people's code.

(+1)

There was one contract I had with a previous employer where I was looking at some old OpenGL code and cursing whoever wrote this undocumented mess, and then after a while I grudgingly decided the code wasn't that bad, and after another while I remembered I was the person who wrote that code.

(+1)

Oh my.... That sounds embarrassing... Thumbs up for admitting this openly though...
I was recently trying to sort out the code of my old LAURA II engine (used in two RPGs hosted here on itch), and there I know I wrote that code before digging through it, and I wonder what I was thinking when I wrote that crap.  Now that is not the reason why the two games this concerns (Star Story and The Fairy Tale REVAMPED) are about to be rewritten in a new engine (it has more to do with the language I used... The compiler refuses to work on me, and I want to make sure I can preserve those games for the future) anyway, but as that did require me to analyze my own code, I hate myself.

(+1)

Also if you type

butler help push

you'll see there's a --ignore flag to supply additional ignore patterns

(+1)

Oh, that's also good to know ;)