git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: alex@bellandwhistle.net
Cc: git@vger.kernel.org
Subject: Re: gitignore vs. exclude vs assume-unchanged?
Date: Wed, 16 Apr 2014 10:51:53 -0700	[thread overview]
Message-ID: <xmqqy4z5go1y.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <b3f480af1c362c615ad9ce85296e2be2@bellandwhistle.net> (alex@bellandwhistle.net's message of "Wed, 16 Apr 2014 09:33:33 -0700")

alex@bellandwhistle.net writes:

> Any clarification on the differences much appreciated:
>
> http://stackoverflow.com/questions/23097368/git-ignore-vs-exclude-vs-assume-unchanged/23097509

Please don't force people to refer to external site.

The .gitignore and .git/info/exclude are the two UIs to invoke the
same mechanism.  In-tree .gitignore are to be shared among project
members (i.e. everybody working on the project should consider the
paths that match the ignore pattern in there as cruft).  On the
other hand, .git/info/exclude is meant for personal ignore patterns
(i.e. you, while working on the project, consider them as cruft).

Assume-unchanged should not be abused for an ignore mechanism.  It
is "I know my filesystem operations are slow.  I'll promise Git that
I won't change these paths by making them with that bit---that way,
Git does not have to check if I changed things in there every time I
ask for 'git status' output".  It does not mean anything other than
that.  Especially, it is *not* a promise by Git that Git will always
consider these paths are unmodified---if Git can determine a path
that is marked as assume-unchanged has changed without incurring
extra lstat(2) cost, it reserves the right to report that the path
*has been* modified (as a result, "git commit -a" is free to commit
that change).

  reply	other threads:[~2014-04-16 17:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 16:33 gitignore vs. exclude vs assume-unchanged? alex
2014-04-16 17:51 ` Junio C Hamano [this message]
2014-04-16 23:07   ` alex
2014-04-16 23:45     ` Jonathan Nieder
2014-04-18  0:36       ` alex
2014-04-22  0:40         ` Andrew Ardill
2014-04-22 17:54           ` Junio C Hamano
2014-04-25 23:09             ` alex
2014-04-26  7:52               ` luc.linux
2014-04-26 12:26             ` 

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy4z5go1y.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=alex@bellandwhistle.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).