git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* gitignore does not ignore wildcard directory if it is a link
@ 2020-08-21 13:37 voxspox
  2020-08-21 16:46 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: voxspox @ 2020-08-21 13:37 UTC (permalink / raw)
  To: git


Hi,

I start with a scenario:

contents of working copy:

/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
using: 2.25.1 on Linux


regards Knut




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gitignore does not ignore wildcard directory if it is a link
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2020-08-21 16:46 UTC (permalink / raw)
  To: voxspox; +Cc: git

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-21 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).