From: Clemens Buchacher <drizzd@aon.at>
To: llucianf <llucianf@gmail.com>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>,
Johannes Sixt <j.sixt@viscovery.net>,
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>,
Ferry Huberts <mailings@hupie.com>
Subject: Re: gitignore design
Date: Sat, 30 Jul 2011 18:01:24 +0200 [thread overview]
Message-ID: <20110730160124.GA7545@toss.lan> (raw)
In-Reply-To: <CACsJy8DcFJUK91cJm3EmHn8BMyA78gzu_pMtqJ0z9oO1RF+suw@mail.gmail.com>
On Sat, Jul 30, 2011 at 08:22:14PM +0700, Nguyen Thai Ngoc Duy wrote:
> On Sat, Jul 30, 2011 at 1:45 PM, Piotr Krukowiecki
> <piotr.krukowiecki@gmail.com> wrote:
> > I was using assume-unchanged for some time but stopped after some
> > weird problems during updates. I'm not sure if this was caused by this
> > or by sparse-checkout (and I use git-svn too). Anyway, after stopping
> > using assume-unchanged and sparse-checkout mysterious problems
> > disappeared.
>
> I'm interested in the problems you had (even better if you found a way
> to reproduce).
Hi, Same here.
Concerning the OP's question, I've also written this FAQ entry,
which explains two methods to deal with the problem:
https://git.wiki.kernel.org/index.php/GitFaq#How_do_I_tell_git_to_ignore_tracked_files.3F
It also mentions assume-unchanged and sparse checkout as a third
option, but it warns that these features were not designed for that
purpose. Apart from the bug fixed in aecda37 I have never had a
problem with them myself. But it's not a particularly convenient
solution in any case.
As far as a possible 'exclude untracked' mechanism is concerned, I
am not sure that is a good thing to have. It's like saying "I want
to track changes to those files, but I do not want to commit
changes by default (e.g. commit -a, add -u etc.)." That may sound
reasonable at first, but I think the desire to ignore changes to
tracked files usually indicates a design problem. And it can almost
always be solved using either option (a) or (b) from the FAQ entry
above.
On the other hand, such a feature bears some risk. The repository
is not guaranteed to be in a certain state, even if git status is
empty. You could still have ignored changes somewhere. And it's
all too easy to forget about those. I know I always forget about
the rules I have in my .git/info/exclude.
Maybe I should not be trying to protect users from shooting
themselves in the foot. But I would be very curious to hear from
the OP why options (a) or (b) above are not a solution for his use
case, before adding yet another "dangerous" mechanism to git.
Clemens
next prev parent reply other threads:[~2011-07-30 16:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 10:20 gitignore design llucianf
2011-07-29 11:51 ` Ferry Huberts
2011-07-29 12:01 ` llucianf
2011-07-29 12:08 ` Ferry Huberts
2011-07-29 12:16 ` llucianf
2011-07-29 12:27 ` Jakub Narebski
2011-07-29 12:44 ` llucianf
2011-07-29 12:57 ` Jakub Narebski
2011-07-29 14:01 ` Ferry Huberts
2011-07-29 12:19 ` Jakub Narebski
2011-07-29 12:58 ` Johannes Sixt
2011-07-29 13:19 ` Jakub Narebski
2011-07-29 13:31 ` Johannes Sixt
2011-07-29 21:39 ` Jakub Narebski
2011-07-30 3:10 ` Nguyen Thai Ngoc Duy
2011-07-30 6:45 ` Piotr Krukowiecki
2011-07-30 13:22 ` Nguyen Thai Ngoc Duy
2011-07-30 15:52 ` Piotr Krukowiecki
2011-07-30 16:01 ` Clemens Buchacher [this message]
2011-07-29 16:44 ` Philip Oakley
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=20110730160124.GA7545@toss.lan \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=jnareb@gmail.com \
--cc=llucianf@gmail.com \
--cc=mailings@hupie.com \
--cc=pclouds@gmail.com \
--cc=piotr.krukowiecki@gmail.com \
/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).