Re: jgit and ignore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tor Arne Vestbø <torarnv@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux