git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: roylee17 <roylee17@gmail.com>
To: git@vger.kernel.org
Subject: How to to override repository-specific attributes in.git/config?
Date: Fri, 2 Apr 2010 09:30:02 -0800 (PST)	[thread overview]
Message-ID: <1270229402991-4843642.post@n2.nabble.com> (raw)


Hi,

Do we currently have a native way to override attributes specified in the
repository-specific .git/config ?

While working with a large project which is composed by multiple
repositories, from time to time, I'd like to override *some* attributes
without modifying each of the repository-specific config files.

For example, when such a project was copied or moved from a window file
system, all files got filemode changed. Even worse, their are many
uncommitted changes! In this case, I'd like to filter out the filemode
changes(with core.filemode=false) when review the uncommitted changes. Since
the core.filemode attribute was specified in the repository-specific config,
modifying the ~/.gitconfig does not help.

The aforementioned situation is not the only case that I'd like to have such
function. Do we currently have a native way to solve this? For example, to
provide an extra config file via environment variable or directly feed the
attributes via environment variable to override only *some* but not *all* of
attributes specified in the repository-specific config.

I found this thread "Introduce the GIT_CONFIG_EXTRA environment variable"
initiated by Miklos Vajna, did provide a solution to my problem, which is
complete different use case though. :-) So I initiate another thread to
discuss the use case here.

Thanks.

Roy
-- 
View this message in context: http://n2.nabble.com/How-to-to-override-repository-specific-attributes-in-git-config-tp4843642p4843642.html
Sent from the git mailing list archive at Nabble.com.

                 reply	other threads:[~2010-04-02 17:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1270229402991-4843642.post@n2.nabble.com \
    --to=roylee17@gmail.com \
    --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 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).