-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
gix config
lists all entries of all configuration files git c…
…onsiders. (#331) Filters allow to narrow down the output.
- Loading branch information
Showing
5 changed files
with
51 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::OutputFormat; | ||
use anyhow::{bail, Result}; | ||
use git_repository as git; | ||
|
||
pub fn list( | ||
repo: git::Repository, | ||
_filters: Vec<String>, | ||
format: OutputFormat, | ||
out: impl std::io::Write, | ||
) -> Result<()> { | ||
if format != OutputFormat::Human { | ||
bail!("Only human output format is supported at the moment"); | ||
} | ||
let config = repo.config_snapshot(); | ||
let config = config.plumbing(); | ||
config.write_to(out)?; | ||
Ok(()) | ||
} |
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