From: Tommy Thorn <tommy-git@thorn.ws>
To: git@vger.kernel.org
Subject: Bug in .gitignore handling
Date: Wed, 26 Mar 2008 13:01:58 -0700 [thread overview]
Message-ID: <47EAABB6.30803@thorn.ws> (raw)
For reasons too upsetting to explain, I have to keep a collection of
symlinks inside my tree but outside of git's control, such as
mydir/foo -> ../otherdir/foo
To stop git clean from removing it, I added "foo" to .gitignore
The problem is that I foo appears in build paths inside the tree that I
would like git clean to pick up, however the pattern "foo" is applied
generally and matches stuff like
mydir/mousetrap/foo/objs
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.
Thanks
Tommy
next reply other threads:[~2008-03-26 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 20:01 Tommy Thorn [this message]
2008-03-26 20:20 ` Bug in .gitignore handling 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
-- strict thread matches above, loose matches on Subject: below --
2008-03-26 20:27 Eyvind Bernhardsen
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=47EAABB6.30803@thorn.ws \
--to=tommy-git@thorn.ws \
--cc=git@vger.kernel.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.