git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [bug] git-ls-files sometimes does not list files with pathspec magic ":(exclude)"
@ 2021-01-13 17:41 Thomas Haller
  2021-01-14  2:07 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Haller @ 2021-01-13 17:41 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

Hi,


It seems git-ls-files has an issue together with certain ":(exclude)"
tags.

For example, on NetworkManager's git tree (top-level directory) I run

  git ls-files -- src/platform/ ":(exclude)shared/n-acd"

which wrongly lists not files. It seems to be some
relation between the exclude and the search path because a different
path/exclude does not exhibit the problem.

I also tested current git-master (72c4083ddf91b489b7b7b812df67ee8842177d98)
which has the same issue.

Here is a reproducer (in a container run on Fedora 33/x86_64):

  podman run -ti alpine:latest \
    sh -c '
      apk add git &&
      git clone https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git &&
      cd NetworkManager &&
      git checkout -B tmp cd754680a6a0e35b286d4157269053ccc3996a32 &&
      echo ">>>>>>now BAD1..." &&
      git ls-files -- src/platform/ ":(exclude)shared/n-acd"
      echo ">>>>>>now GOOD1..." &&
      git ls-files -- src/platform/ ":(exclude)shared/c-list"
      echo ">>>>>>now GOOD2..." &&
      git ls-files -- src/platform ":(exclude)shared/n-acd"
      echo ">>>>>>now GOOD3..." &&
      git ls-files -- src/vpn/ ":(exclude)shared/n-acd"
   '

Note that only the first call in the reproducer has the unexpected
result.


best,
Thomas


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-01-14 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 17:41 [bug] git-ls-files sometimes does not list files with pathspec magic ":(exclude)" Thomas Haller
2021-01-14  2:07 ` Junio C Hamano
2021-01-14 20:21   ` Jeff King

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