Git Ignore Exception bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it ignore doesn't seem to be working properly when adding exceptions.

Environment:

Mac, running latest El Capitan (10.11.6)

% git --version
git version 2.9.0

-----------cut here-------------
#!/bin/sh
TEMP=mktemp

# Create a temporary repo
mkdir repo
cd repo

git init

echo "foo/*" >> .gitignore
echo "!foo/bar" >> .gitignore
git add .gitignore
git commit -m "Ignore file with exceptions"

# Create the directory structure
mkdir foo
mkdir foo/bar

# Create files to be ignored
touch foo/1
touch foo/2

# Create files that should be identified
touch foo/bar/a
touch foo/bar/b

# Should ignore foo and indicate that all the files in foo/bar are un-committed
git status

# Move back to the regular directory
cd ..
-----------cut here-------------

Expected results
% git st
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        foo/bar/


Nate



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]