git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Tor Arne Vestbø" <torarnv@gmail.com>
Cc: "Ferry Huberts (Pelagic)" <ferry.huberts@pelagic.nl>,
	Jon Smirl <jonsmirl@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: jgit and ignore
Date: Sun, 1 Mar 2009 09:57:05 -0800	[thread overview]
Message-ID: <20090301175705.GE14365@spearce.org> (raw)
In-Reply-To: <49AACB3A.8070809@gmail.com>

Tor Arne Vestbø <torarnv@gmail.com> wrote:
> Shawn O. Pearce wrote:
> >> Just to be clear, I noticed you left out the global core.excludesfile
> >> (from ~/.gitconfig) here. I guess this intentional?
> > 
> > No, I didn't.  core.excludesfile is read from the config, the config
> > is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config.  The
> > last setting wins.
> 
> Ah, I see, I thought each config was read in a separate steps. Thanks
> for clearing that up.

Well, they are.

But in git-core the value is pulled into a single static.  For a
string its often a single static char*.  So the config handle
function is called up to 3 times for foo.bar, and the last one to
be called is the one that finally set the value.  They are read
in the order I described above, so GIT_DIR/config has a chance to
override any prior setting.

In JGit the RepositoryConfig object parses the other direction.
Its a more classical "default" pattern, where if GIT_DIR/config
doesn't have a foo.bar we call to another instance which had parsed
~/.gitconfig, and so on.

Either way produces the same result.

-- 
Shawn.

  reply	other threads:[~2009-03-01 17:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 16:31 jgit and ignore Jon Smirl
2009-02-28 17:26 ` Shawn O. Pearce
2009-03-01 10:11   ` Ferry Huberts (Pelagic)
2009-03-01 12:54     ` Jon Smirl
2009-03-01 13:06       ` Ferry Huberts (Pelagic)
2009-03-01 13:34         ` Tor Arne Vestbø
2009-03-01 13:47           ` Ferry Huberts (Pelagic)
2009-03-01 14:58             ` Tor Arne Vestbø
2009-03-01 17:16               ` Shawn O. Pearce
2009-03-01 17:42                 ` Tor Arne Vestbø
2009-03-01 17:49                   ` Shawn O. Pearce
2009-03-01 17:51                     ` Tor Arne Vestbø
2009-03-01 17:57                       ` Shawn O. Pearce [this message]
2009-03-01 17:43                 ` Ferry Huberts (Pelagic)
2009-03-01 17:47                   ` Shawn O. Pearce
2009-03-01 20:24                 ` Robin Rosenberg
2009-03-04 17:50                   ` Ferry Huberts (Pelagic)
2009-03-01 17:17               ` Ferry Huberts (Pelagic)
2009-03-01 14:08         ` Jon Smirl
2009-03-01 14:21           ` Tor Arne Vestbø
2009-03-01 14:31             ` Jon Smirl
2009-03-01 14:33               ` Tor Arne Vestbø
2009-03-01 20:47               ` Robin Rosenberg

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=20090301175705.GE14365@spearce.org \
    --to=spearce@spearce.org \
    --cc=ferry.huberts@pelagic.nl \
    --cc=git@vger.kernel.org \
    --cc=jonsmirl@gmail.com \
    --cc=torarnv@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).