Closed Yeraze closed 10 years ago
Looks like you're right. I think I misread the gitignore man-page, or at least misunderstood it. The only source of ignore patterns with a higher precedence that .gitignore is ignore patterns for git commands which support them. I think that this will require refactoring the git module to pass around any '!' ignore flags as command line flags. I'll try to re-read the docs and see if I'm missing a simpler way, but in any case, this will probably take some time.
For my own later reference, I think this will actually just entail reimplementing the status
method in git.py to take an extra parameter of items to include, passed to it by the commit
/initialize_remote_repository
call chain. Even then I'm not really sure how to make git-status
respect specific ignore flags - we may need to replace the git status --porcelain
call with a call to something more rudimentary like git ls-files
.
I've looked into this quite a bit in the new shell version. Unfortunately it's just not really possible to do given the precedence of the different gitignore sources and the lack of consistent -i/--ignore
flags in the Git commands. I'm going to close this for now, because I'm afraid it's just not really possible given the "out-of-worktree" approach. I'll keep it in mind though, because it is a feature I would like as well, and if I have a stroke of genius regarding how to implement, I'll do it.
Using the following command:
Doesn't bring the .tags file over. .tags is in the .gitignore file on the remote, and exists in the directory.