git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: voxspox <voxspox@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: gitignore does not ignore wildcard directory if it is a link
Date: Fri, 21 Aug 2020 09:46:55 -0700	[thread overview]
Message-ID: <xmqqa6yo9cao.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <0179b688-576b-7423-8824-9b57fe8f92fc@gmx.net> (voxspox@gmx.net's message of "Fri, 21 Aug 2020 15:37:15 +0200")

voxspox <voxspox@gmx.net> writes:

> /somefile1
> /test/dir1  (directory)
> /test/dir2  (link to directory)
> /test/dir3  (link to directory)
> /test/file1
>
> I want to ignore all subfolders in "test", thus I modified my .gitignore to:
>
> /test/*/
>
>
>> git status
>
> Untracked files:
>   test/dir2
>   test/dir3
>
>
> Putting "/test/dir3" into .gitignore will work fine.
>
>
> -> It seems that directories are not ignored by a wildcard pattern if
> the directory is a link

This is working as designed, intended and expected, I would think.
Git does track symbolic links as the first-class citizen, and dir2
and dir3 in the above example are *not* directories.

      reply	other threads:[~2020-08-21 16:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 13:37 gitignore does not ignore wildcard directory if it is a link voxspox
2020-08-21 16:46 ` Junio C Hamano [this message]

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=xmqqa6yo9cao.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=voxspox@gmx.net \
    /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).