All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Seth Robertson <in-gitvger@baka.org>
Cc: git@vger.kernel.org
Subject: Re: .gitignore Bug Report on the behavior of *
Date: Sat, 25 Sep 2010 22:03:48 +0200	[thread overview]
Message-ID: <201009252203.48820.j6t@kdbg.org> (raw)
In-Reply-To: <201009251923.o8PJNJYE031841@no.baka.org>

On Samstag, 25. September 2010, Seth Robertson wrote:
> # Properly shows X and B/XX as untracked, as I expected
> echo X > X; echo XX > B/XX; git status
>
> # I expected B/XX to show up as untracked
> rm -f .gitignore B/.gitignore
> echo '*' > .gitignore; echo '!*' > B/.gitignore; git status

You should update your expectations to match what you got. ;-)

To show why your expectations are wrong, consider a *huge* and *deep* 
directory with thousands and thousands of subdirectories, call it "usr", that 
should be ignored. The .gitignore at the top-level would just say:

  /usr

Do you really expect git to walk down this ignored directory, just to make 
double-sure that really, really down there does nowhere exist a .gitignore 
that says "oh, wait, don't ignore *this* file"?

-- Hannes

  reply	other threads:[~2010-09-25 20:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25 19:23 .gitignore Bug Report on the behavior of * Seth Robertson
2010-09-25 20:03 ` Johannes Sixt [this message]
2010-09-25 20:40   ` [PATCH] " Seth Robertson
2010-09-25 20:53   ` Ævar Arnfjörð Bjarmason
2010-09-25 23:27   ` Sverre Rabbelier

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

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

  git send-email \
    --in-reply-to=201009252203.48820.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=in-gitvger@baka.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.