All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: david@lang.hm, git@vger.kernel.org
Subject: Re: Untracked working tree files
Date: Wed, 15 Oct 2008 12:49:49 -0700	[thread overview]
Message-ID: <20081015124949.b657a8db.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0810151219120.3288@nehalem.linux-foundation.org>

On Wed, 15 Oct 2008 12:31:40 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> 
> On Wed, 15 Oct 2008, david@lang.hm wrote:
> > 
> > the fact that git will happily leave modified things in the working directory
> > appears to be very helpful for some developers, but it's also a big land mine
> > for others.
> 
> Hmm. It doesn't actually do that normally. If you switch between trees, 
> git will (or _should_) remove the old files that it knows about. If you 
> get a lot of left-over turds, there's something wrong.
> 
> It could be a git bug, of course. That said, especially considering the 
> source of this, I wonder if it's just that Andrew ends up using all those 
> non-git scripts on top of a git tree, and then that can result in git 
> *not* knowing about a certain file, and then when switching between trees 
> (with either git checkout or with git reset), the data that was created 
> with non-git tools gets left behind and now git will be afraid to 
> overwrite it.

I treat my git directory as a read-only thing.  I only ever modify it
with git commands.

> So yes, there are ways to force it (both "git checkout -f"  and "git reset 
> --hard" having already been mentioned), but the need for that - especially 
> if it's common - is a bit discouraging.
> 
> Especially since it's still possible that it's some particular mode of git 
> usage that leaves those things around. Andrew - have you any clue what it 
> is that triggers the behavior?

Sorry, no, I haven't seen a pattern.

> (By the filename, I realize it's a file that doesn't exist in one tree or 
> the other, and which doesn't get removed at some point. But have you had 
> merge failures, for example? Is it perhaps a file that was created during 
> a non-clean merge, and then got left behind due to the merge being 
> aborted? It would be interesting to know what led up to this..)

That's certainly a possibility - I get a lot of merge failures.  A real
lot.  And then quite a bit of rebasing goes on, especially in
linux-next.  And then there's all the other stuff which Stephen does on
top of the underlying trees to get something releasable happening.

  parent reply	other threads:[~2008-10-15 19:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 18:56 Untracked working tree files Andrew Morton
2008-10-15 19:09 ` david
2008-10-15 19:14   ` david
2008-10-15 19:24     ` Andrew Morton
2008-10-15 19:26     ` Andrew Morton
2008-10-15 19:32       ` Nicolas Pitre
2008-10-15 19:34         ` Nicolas Pitre
2008-10-15 19:31     ` Linus Torvalds
2008-10-15 19:42       ` david
2008-10-15 19:56         ` Linus Torvalds
2008-10-15 20:17           ` david
2008-10-15 19:49       ` Andrew Morton [this message]
2008-10-15 20:08         ` Linus Torvalds
2008-10-15 20:23           ` Andrew Morton
2008-10-16  8:42             ` Paolo Ciarrocchi
2008-10-16  9:32               ` Andrew Morton
2008-10-15 20:23           ` Linus Torvalds
2008-10-15 20:30             ` Andrew Morton
2008-10-15 22:06             ` Junio C Hamano
2008-10-15 23:00               ` [PATCH] reset --hard/read-tree --reset -u: remove unmerged new paths Junio C Hamano
2008-10-15 23:16                 ` Linus Torvalds
2008-10-16  6:27                   ` Junio C Hamano
2008-10-16  7:20                 ` Ingo Molnar
2008-10-16 14:49                   ` Junio C Hamano

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=20081015124949.b657a8db.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david@lang.hm \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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.