Permalink
Browse files

Status no longer includes ignored files.

  • Loading branch information...
1 parent 076df64 commit 96bf1ac28377bdaa6b26fbaf160894c2e99c6cd1 @gf3 gf3 committed Mar 12, 2009
Showing with 7 additions and 1 deletion.
  1. +5 −0 lib/git/lib.rb
  2. +2 −1 lib/git/status.rb
View
@@ -304,6 +304,11 @@ def ls_files
end
+ def ignored_files
+ command_lines('ls-files', ['--others', '-i', '--exclude-standard'])
+ end
+
+
def config_remote(name)
hsh = {}
config_list.each do |key, value|
View
@@ -81,11 +81,12 @@ def blob(type = :index)
def construct_status
@files = @base.lib.ls_files
+ ignore = @base.lib.ignored_files
# find untracked in working dir
Dir.chdir(@base.dir.path) do
Dir.glob('**/*') do |file|
- @files[file] = {:path => file, :untracked => true} unless @files[file] || File.directory?(file)
+ @files[file] = {:path => file, :untracked => true} unless @files[file] || File.directory?(file) || ignore.include?(file)
end
end

0 comments on commit 96bf1ac

Please sign in to comment.