git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
To: Tommy Thorn <tommy-git@thorn.ws>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Bug in .gitignore handling
Date: Wed, 26 Mar 2008 21:27:49 +0100	[thread overview]
Message-ID: <FDBA351C-54DE-406D-930C-7DCE0694A042@orakel.ntnu.no> (raw)

On 26. mars. 2008, at 21.01, Tommy Thorn wrote:

[...]

> According to the man page, I should be able to change .gitignore to
> "foo/" to stop it from looking recursively, but that doesn't work, as
> now git clean -n -f -d wants to remove mydir/foo but not mydir/foo/ 
> objs
>
> My desperate attempts "./foo" and "^foo" also didn't work. Please note
> that this is a vastly simplified version of the real problem, so I  
> can't
> just use "!mousetrap/foo".
>
> It seems "foo/" _should_ work even though foo isn't a directory.

Have you tried "/foo"?  That should match "foo" only in the root of  
the repository, which is what I think you're trying to do.  "foo/"  
means to only match "foo" if it is a directory.
-- 
Eyvind Bernhardsen

             reply	other threads:[~2008-03-26 20:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26 20:27 Eyvind Bernhardsen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-26 20:01 Bug in .gitignore handling Tommy Thorn
2008-03-26 20:20 ` Junio C Hamano
2008-03-26 20:26   ` Tommy Thorn
2008-03-26 20:27 ` Linus Torvalds
2008-03-26 20:32   ` Linus Torvalds
2008-03-26 20:35   ` Tommy Thorn
2008-03-26 20: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=FDBA351C-54DE-406D-930C-7DCE0694A042@orakel.ntnu.no \
    --to=eyvind-git@orakel.ntnu.no \
    --cc=git@vger.kernel.org \
    --cc=tommy-git@thorn.ws \
    /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).