scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 57 forks source link

Seems to ignore whatever is in the .gitignore #23

Closed curtisblackwell closed 10 years ago

curtisblackwell commented 11 years ago

Things like commercial CMS files shouldn't be versioned in public repos, but still need deployment.

scttnlsn commented 11 years ago

Yeah, I've experienced the same problem with config files. What about another config option where one can list a set of files that get transfered every time? I guess the danger is that they get modified locally and unintentionally transfered to the server.

curtisblackwell commented 11 years ago

why not ignore the .gitignore and transfer everything not ignored in exclude? or have a use_gitignore: yes setting?

i think the latter suggestion would be the most efficient/best ways to handle it.

scttnlsn commented 11 years ago

I don't think it is safe to assume that all the files in the .gitignore should be transferred to the server.

curtisblackwell commented 11 years ago

I agree, but I'd take it further: I don't think it's right to assume anything about which files should be transferred.

  1. My suggestion seems to be the convention. I realize this isn't just another FTP program, but it serves the same purpose. If you look at something like Panic's Transmit, it transfers everything except for the files you specifically tell it to ignore in preferences. The same goes for git-ftp, something very similar to Dandelion. Git-ftp uses a separate file (.git-ftp-ignore) to solve this problem.
  2. By definition, a .gitignore is intended to tell git what not to track. Dandelion isn't git, and it doesn't track files. It deploys them.
  3. It's easier, less confusing, and presumably less error-prone to paste the contents of .gitignore into dandelion.yaml, if you know you want to ignore everything in there when deploying, than it is to read through everything and make sure you re-include the things you ignored for tracking purposes when you're deploying.

You already have the exclude option, which shows you don't assume everything should be transferred to the server. The way things are now, you assume if it's not versioned, it shouldn't be deployed, which you already agreed is incorrect. I think the best solution is to (1) not ignore everything in .gitignore by default, (2) create something like a use_gitignore option to simplify ignoring everything in .gitignore for those who want to, and (3) create an include option to counteract the .gitignore for those who prefer that method.

If you still disagree with me on the default behavior, perhaps being able to set something like a use_gitignore option to no would be a good compromise.

In any case, I appreciate your writing of Dandelion and taking the time to read through my suggestions. Thanks.

scttnlsn commented 11 years ago

Yeah, those are great points. There's definitely no harm in putting the same files in .gitignore and the Dandelion exclude list if need be. I'll take a look at implementing this when I get a chance.

curtisblackwell commented 11 years ago

awesome, thanks. if you have a way to receive donations, i'll donate to the project for that feature.

scttnlsn commented 10 years ago

Ultimately left .gitignore alone and introduced an additional config param that allows unversioned files to be transferred.