git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nathan Williams <nwilliams@sofi.org>
To: git@vger.kernel.org
Cc: Eric Severtson <esevertson@sofi.org>
Subject: Git Ignore Exception bug
Date: Fri, 9 Sep 2016 15:39:02 -0600	[thread overview]
Message-ID: <CAC5iUd2mS1n1=sRB=Bs6tn3L3raAXrZaEcs765UFtQZB9XZuYg@mail.gmail.com> (raw)

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

             reply	other threads:[~2016-09-09 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 21:39 Nathan Williams [this message]
2016-09-14 11:26 ` Git Ignore Exception bug Dennis Kaarsemaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC5iUd2mS1n1=sRB=Bs6tn3L3raAXrZaEcs765UFtQZB9XZuYg@mail.gmail.com' \
    --to=nwilliams@sofi.org \
    --cc=esevertson@sofi.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).