public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Paul Gardiner <lists@glidos•net>
To: Glenn Griffin <ggriffin.kernel@gmail•com>,
	git@vger•kernel.org, lists@glidos•net
Subject: Re: How do I stop git enumerating my working directory
Date: Wed, 02 Jul 2008 15:47:43 +0100	[thread overview]
Message-ID: <486B950F.2040801@glidos.net> (raw)
In-Reply-To: <c9e534200807011002q45ffca7bq8d91cd9b62335796@mail.gmail.com>

Glenn Griffin wrote:
> On Tue, Jul 1, 2008 at 8:57 AM, Paul Gardiner <lists@glidos•net> wrote:
>> Hi,
>>
>> I'm a recent convert to git. I've been swapping over my projects
>> from cvs to git. The latest candidate for conversion is the
>> config files for my Linux server. I've been using cvs to record
>> all the config changes, and - mostly-automatically - to setup
>> new servers. Git will do a far better job, I think, but
>> I think I'm going to run into a problem: the root directory
>> of the server will be the working directory. Only relatively
>> few files will be under version control. How do I stop git
>> enumerating the whole drive whenever I do things like git-diff?
> 
> I'm doing a similar thing in my home directory where the vast majority of files
> are not being tracked, but only a select few are.  I've found that git
> automatically handles this case much better than other SCM's like subversion
> because of it's concept of the index.  Most of git's commands wont enumerate
> your directory they will first read the index to see what files it's interested
> in, and then do an lstat on those files to see which if any have changed.
> git-diff in particular should do this to my knowledge.  git-status is one of
> the few commands that will actually enumerate your directory to tell you which
> files are untracked, so long as you use status with care you will probably find
> you don't need to do anything special or even setup
> a .gitignore.
> 
> Like I said, that's my experience your's may vary.

Brilliant! I've now tried it and it does just as you say. I don't
need git-status so it's just fine. Thanks for the advice.

P.

      parent reply	other threads:[~2008-07-02 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 15:57 How do I stop git enumerating my working directory Paul Gardiner
2008-07-01 16:37 ` Matthieu Moy
2008-07-02 14:51   ` Paul Gardiner
2008-07-01 19:01 ` Brian Gernhardt
     [not found] ` <c9e534200807011002q45ffca7bq8d91cd9b62335796@mail.gmail.com>
2008-07-02 14:47   ` Paul Gardiner [this message]

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=486B950F.2040801@glidos.net \
    --to=lists@glidos$(echo .)net \
    --cc=ggriffin.kernel@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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