git ls-files should not show worktree files as untracked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Using git 2.6.2
I think worktree should behave consistently like submodule

Run following commands
```
echo 1 > 1.txt
git init
git add 1.txt
git commit -m "initial commit"
echo 2 > 2.txt # untracked file
mkdir def
cd def
git clone --separate-git-dir ../.git/ghi .. . # simulate an untracked submodule
cd ..
git worktree add abc

git ls-files --exclude-standard --full-name --others
```

Actual: list all the files of abc
2.txt
abc/1.txt
def/

Expected: just the directory of abc
2.txt
abc/
def/


Hint: path.c: git_path_submodule() should read "commondir" ?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]