Description of problem: In libvirt .gitignore has the following rule: /build-aux/ !/build-aux/*.pl According to the git document: An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. The rule should be modified as followed, /build-aux/* !/build-aux/*.pl Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1.git clone https://github.com/libvirt/libvirt.git 2.touch build-aux/test.pl Actual results: git status shows nothing is modified Expected results: git status shows new file Additional info:
Fixed by: commit f0ad8e7ee083c4bf196af42c615aac803be08460 Refs: v3.2.0-57-gf0ad8e7ee Author: Jiri Denemark <jdenemar> AuthorDate: Fri Apr 7 08:50:21 2017 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Fri Apr 7 10:08:33 2017 +0200 Properly ignore files in build-aux directory We want to ignore all files except *.pl in build-aux directory, however the unignore pattern "!/build-aux/*.pl" doesn't have any effect because a previous "/build-aux/" pattern ignores the directory itself rather than individual files in it. https://bugzilla.redhat.com/show_bug.cgi?id=1439994 Signed-off-by: Jiri Denemark <jdenemar>