Created
November 5, 2014 17:04
-
-
Save msutter/776816f4e44f12facfda to your computer and use it in GitHub Desktop.
https://github.com/schacon/ruby-git/issues/136 -> Workaround code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'git' | |
g = Git.open(working_dir) | |
untracked_files = gitstatus_untracked_workaround(g) | |
def gitstatus_untracked_workaround(g) | |
gem_rubygit_buggy_untracked_files = g.status.untracked.keys | |
git_files = `git --work-tree=#{g.dir} --git-dir=#{g.dir}/.git ls-files -z -d -m -o -X .gitignore`.split("\x0") | |
gem_rubygit_buggy_untracked_files & git_files | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment