All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: MALAISE Pascal <malaise@magic.fr>, git@vger.kernel.org
Subject: Re: wishlist: git gui not listing untracked files in unstaged list
Date: Wed, 10 Mar 2010 12:07:28 -0800	[thread overview]
Message-ID: <20100310200728.GD21994@spearce.org> (raw)
In-Reply-To: <7vaaugrlqs.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> MALAISE Pascal <malaise@magic.fr> writes:
> 
> > Many projects are organized so that the result of compilation is mixed with
> > sources.
> > It would be very useful to configure git gui so that untracked files are not
> > listed in the un-staged list.
> > I have patched git gui, function rescan_stage2, line 1414 to do so:
> >   # set fd_lo [eval git_read ls-files --others -z $ls_others]
> >   set fd_lo [eval git_read ls-files -z $ls_others]
> 
> Shouldn't this line instead be running this:
> 
>     ls-files --others --exclude-standard -z $ls_others
> 
> so that it would use the usual .gitignore mechanism?

Uh.  It does use the normal ignore systems.  Above on
line 1400 we add into the argument list for $ls_others
--exclude-per-directory=.gitignore,
--exclude-from=[gitdir info exclude], and
--exclude-from=[get_config core.excludesfile].

But this code all predates --exclude-standard.  Today we could just
use --exclude-standard and bypass all of that.

I have no idea why the original poster isn't getting his ignore
list(s) to work.  I also have no idea why dropping the --others
flag from the ls-files command gets him a useful result.

Maybe the problem is, the build artifacts are in a single
subdirectory (e.g. "out/"), and git status shows only "out/"
as untracked.  But git-gui shows all of the files (potentially
thousands) because ls-files --others exploded the directory
contents recursively?

By dropping --others we hide that directory's contents by listing
only files that are already tracked.  I'm surprised that didn't
confuse git-gui further, since a file was claimed to be both tracked
and untracked at the same time during the rescan.

-- 
Shawn.

  reply	other threads:[~2010-03-10 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 19:43 wishlist: git gui not listing untracked files in unstaged list MALAISE Pascal
2010-03-10 19:59 ` Junio C Hamano
2010-03-10 20:07   ` Shawn O. Pearce [this message]
2010-03-10 20:57     ` MALAISE Pascal
2010-03-10 22:00     ` Patrick Higgins
2010-03-10 22:12       ` Jeff King
2010-03-10 22:14         ` Shawn O. Pearce
2010-03-10 22:30           ` Junio C Hamano
2010-03-10 22:32           ` Jeff King
2010-03-10 22:36             ` Jeff King
2010-03-11  7:08             ` Johannes Sixt
2010-03-11  7:11               ` Jeff King
2010-03-11 12:52               ` Andreas Schwab

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=20100310200728.GD21994@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=malaise@magic.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.