aboutsummaryrefslogtreecommitdiffstats
path: root/repository/gogit_config.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-10-25 23:35:36 +0100
committerMichael Muré <batolettre@gmail.com>2020-10-25 23:35:36 +0100
commit8a158d1f94ed74c0c3b88888fa60795373eaa159 (patch)
treeea38d8852ba651e9273ef8986c134fc7c1006602 /repository/gogit_config.go
parent4143c3d176bdf6d776c4d8fd20eccbc2b5e0734b (diff)
downloadgit-bug-8a158d1f94ed74c0c3b88888fa60795373eaa159.tar.gz
repository: fix edge case in git config read, affecting bridges
Diffstat (limited to 'repository/gogit_config.go')
-rw-r--r--repository/gogit_config.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/repository/gogit_config.go b/repository/gogit_config.go
index 7812de76..2f9a4cc3 100644
--- a/repository/gogit_config.go
+++ b/repository/gogit_config.go
@@ -79,6 +79,7 @@ func (cr *goGitConfigReader) ReadAll(keyPrefix string) (map[string]string, error
}
section := cfg.Raw.Section(split[0])
rest := strings.Join(split[1:], ".")
+ rest = strings.TrimSuffix(rest, ".")
for _, subsection := range section.Subsections {
if strings.HasPrefix(subsection.Name, rest) {
for _, option := range subsection.Options {