isomorphic-git/isomorphic-git

statusMatrix() does not work correctly when there is a symlink that targets an ignored directory

Closed

#1,215 opened on Aug 30, 2020

 (0 comments) (0 reactions) (0 assignees)JavaScript (351 forks)batch import
buggood first issue

Repository metrics

Stars
 (7,054 stars)
PR merge metrics
 (Avg merge 13d 13h) (7 merged PRs in 30d)

Description

Bug description

When there is a symlink that targets an ignored directory (such as node_modules), statusMatrix() would list files within the ignored directory as "new". This is different from git status --porcelain=v1 when these files are not listed.

Steps to reproduce

  1. Clone https://github.com/KSXGitHub/isomorphic-git-issue-incorrect-file-listing-for-symlink.git
  2. Run npm install and npm test

You will see that the files "within" symlink-to-ignored-directory are listed by isomorphic-git but not by native git.

Contributor guide