Replies: 2 comments 1 reply
-
This should do the trick. let repo = gix::open(repo_path)?;
repo.config_snapshot().string_by_key("init.defaultBranch")?; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Even if there’s no repo at |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m just starting to poke around
gix
so forgive me if this is clearly documented somewhere. How would you read global config values? I see that there’s some config-reading functionality for repos, but what if I want to know a global config value outside of the context of a repo?For instance, my use case is making a tool to manage a worktrees workflow, and I want to know the default branch name so I can create a directory/worktree named after the default branch.
Beta Was this translation helpful? Give feedback.
All reactions