{"thread":{"id":"40603","subject":"git ls-files should not show worktree files as untracked","startedAt":"2015-10-21T04:58:17Z","lastAt":"2015-10-21T04:58:17Z","messageCount":1,"participants":["乙酸鋰"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"272021","messageId":"CAHtLG6SDrk9Kw2edTVhY2M_8-O09_=VbZhsJYeQXY7No660VDw@mail.gmail.com","threadId":"40603","inReplyTo":null,"subject":"git ls-files should not show worktree files as untracked","fromName":"乙酸鋰","fromEmail":"ch3cooli@gmail.com","sentAt":"2015-10-21T04:58:17Z","receivedAt":"2015-10-21T04:58:17Z","isPatch":false,"sender":{"key":"ch3cooli@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2804967?v=4"},"body":"Hi,\nUsing git 2.6.2\nI think worktree should behave consistently like submodule\n\nRun following commands\n```\necho 1 > 1.txt\ngit init\ngit add 1.txt\ngit commit -m \"initial commit\"\necho 2 > 2.txt # untracked file\nmkdir def\ncd def\ngit clone --separate-git-dir ../.git/ghi .. . # simulate an untracked submodule\ncd ..\ngit worktree add abc\n\ngit ls-files --exclude-standard --full-name --others\n```\n\nActual: list all the files of abc\n2.txt\nabc/1.txt\ndef/\n\nExpected: just the directory of abc\n2.txt\nabc/\ndef/\n\n\nHint: path.c: git_path_submodule() should read \"commondir\" ?\n"}]}