-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This method allows you to set multiple values for the same key in a particular config, similar to `git config --add "include.path" some/path`. For example, I have a git config with an existing `include.path` value: ``` $ cat ~/src/opensource/rugged/.git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote "origin"] url = [email protected]:codenamev/rugged.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [submodule "vendor/libgit2"] active = true url = https://github.com/libgit2/libgit2.git [include] path = /Users/codenamev/.gitconfig.reflow ``` With `Rugged::Config#add` I can set another value for `include.path` without overwriting the existing value: ``` ruby -I lib -rrugged -e'\ config = Rugged::Repository.new("/Users/codenamev/src/opensource/rugged").config; config.add("include.path", "/Users/codenamev/.gitconfig.extras"); p config.get_all("include.path")' ["/Users/codenamev/.gitconfig.reflow", "/Users/codenamev/.gitconfig.extras"] ``` References #725
- Loading branch information
Showing
4 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters