git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Johnson <computerdruid@gmail.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: ls-files --exclude broken?
Date: Wed, 15 Sep 2010 19:31:16 -0400	[thread overview]
Message-ID: <201009151931.23482.ComputerDruid@gmail.com> (raw)
In-Reply-To: <AANLkTimuTHvA+qjqpmz=VkCpTTiRA7imb5+ZyTVmPwYy@mail.gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 1670 bytes --]

On Wednesday 15 September 2010 18:40:20 Jay Soffian wrote:
> Am I missing something really obvious here?
> kore:~/Repos/git (master)$ git ls-files | wc -l
>     2009
> kore:~/Repos/git (master)$ git ls-files -x \* | wc -l
>     2009
> kore:~/Repos/git (master)$ git ls-files -i -x \* | wc -l
>     2009
> kore:~/Repos/git (master)$ git version
> git version 1.7.3.rc1.5.g95127

For fun, I bisected this. This behavior changed in the following commit. 
Before this, it worked as you expected. The other replies seem to explain this 
more.

b5227d80aee5173bfda6aa43a890d03110b0df26 is the first bad commit
commit b5227d80aee5173bfda6aa43a890d03110b0df26
Author: Jeff King <peff@peff.net>
Date:   Mon Oct 12 01:11:57 2009 -0400

    ls-files: excludes should not impact tracked files
    
    In all parts of git, .gitignore and other exclude files
    impact only how we treat untracked files; they should have
    no effect on files listed in the index.
    
    This behavior was originally implemented very early on in
    9ff768e, but only for --exclude-from. Later, commit 63d285c
    accidentally caused us to trigger the behavior for
    --exclude-per-directory.
    
    This patch totally ignores excludes for files found in the
    index. This means we are reversing the original intent of
    9ff768e, while at the same time fixing the accidental
    behavior of 63d285c. This is a good thing, though, as the
    way that 9ff768e behaved does not really make sense with the
    way exclusions are used in modern git.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

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

  parent reply	other threads:[~2010-09-15 23:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 22:40 ls-files --exclude broken? Jay Soffian
2010-09-15 23:06 ` Nguyen Thai Ngoc Duy
2010-09-15 23:12 ` Junio C Hamano
2010-09-15 23:19   ` Jay Soffian
2010-09-15 23:29     ` Nguyen Thai Ngoc Duy
2010-09-15 23:41       ` Jay Soffian
2010-09-15 23:47         ` Jay Soffian
2010-09-16  0:16         ` Jeff King
2010-09-16  0:33           ` Jay Soffian
2010-09-16  0:50             ` Jeff King
2010-09-15 23:34     ` Elijah Newren
2010-09-15 23:21   ` Kevin Ballard
2010-09-15 23:31 ` Daniel Johnson [this message]
2010-09-15 23:56 ` [PATCH] git-ls-files.txt: clarify -x/--exclude option Jay Soffian
2010-09-16  0:19   ` Jeff King
2010-09-16  0:41   ` Junio C Hamano
2010-09-16  0:51     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009151931.23482.ComputerDruid@gmail.com \
    --to=computerdruid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).