Bug 565251 - Git.status.addPath does not filter sub-modules or sub-git resources
Summary: Git.status.addPath does not filter sub-modules or sub-git resources
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 5.8   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 6.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 15:58 EDT by François Armand CLA
Modified: 2022-03-06 09:44 EST (History)
2 users (show)

See Also:


Attachments
Example source file demonstrating the problem (3.51 KB, text/x-java)
2020-07-15 15:58 EDT, François Armand CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description François Armand CLA 2020-07-15 15:58:40 EDT
Created attachment 283611 [details]
Example source file demonstrating the problem

If I have a git repository and if I create an other git repo under that one (either a sub module or a git repository), then files modified under that repository are never filtered in `Git.status` even if I `.addPath` something unrelated. 


See attanched file for an example to reproduce with JGit 5.8.0.
Comment 1 Thomas Wolf CLA 2020-07-16 16:47:21 EDT
Yes, IndexDiff.diff() should probably propagate the filter also to its SubmoduleWalk by doing

  if (filter != null) smw.setFilter(filter)

after line 570.
Comment 2 Eclipse Genie CLA 2020-07-17 13:41:51 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/166458
Comment 3 Eclipse Genie CLA 2022-03-06 05:35:52 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/191515