From: Bryan Turner <bturner@atlassian.com>
To: rsbecker@nexbridge.com
Cc: Git Users <git@vger.kernel.org>
Subject: Re: [Best Practices Request] clean/smudge configuration
Date: Wed, 09 May 2018 22:39:00 +0000 [thread overview]
Message-ID: <CAGyf7-GJgpCZ=wEorLxYOm_ABaDamWKkTnOtaAwti35DJ_zS7g@mail.gmail.com> (raw)
In-Reply-To: <004d01d3e7e2$517f78d0$f47e6a70$@nexbridge.com>
On Wed, May 9, 2018 at 3:09 PM Randall S. Becker <rsbecker@nexbridge.com>
wrote:
> The question: what is the best practice for versioning the parts of
> clean/smudge filters that are in .git/config given that only some users in
> my environment will be cloning the repository in question and that I
really
> can't put the entries in /etc/gitconfig or ~/.gitconfig because of
potential
> conflicts with other repositories that might also have clean/smudge
> definitions.
Depending on level of trust, one approach might be to use an [include] in
.git/config to include a file that's in the repository. Something like:
[include]
path = ../path/to/config
That way that part of the configuration can be derived from the
repository's contents. If you checkout a revision where the file doesn't
exist, then Git just ignores the include.
You're trusting the repository's contents, though, at that point; whatever
is in that file will be included in your overall config and honored by Git.
Bryan
next prev parent reply other threads:[~2018-05-09 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 22:08 [Best Practices Request] clean/smudge configuration Randall S. Becker
2018-05-09 22:39 ` Bryan Turner [this message]
2018-05-09 22:57 ` Randall S. Becker
2018-05-10 19:59 ` Randall S. Becker
2018-05-11 2:27 ` Junio C Hamano
2018-05-11 19:25 ` Randall S. Becker
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='CAGyf7-GJgpCZ=wEorLxYOm_ABaDamWKkTnOtaAwti35DJ_zS7g@mail.gmail.com' \
--to=bturner@atlassian.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.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.
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).