@@ -65,7 +65,7 @@ func (c *Configuration) Find(val string) string {
65
65
return output
66
66
}
67
67
68
- // FindGlobal returns the git config value global scope for the key
68
+ // FindGlobal returns the git config value in global scope for the key
69
69
func (c * Configuration ) FindGlobal (key string ) string {
70
70
output , _ := c .gitConfig ("--global" , key )
71
71
return output
@@ -77,7 +77,7 @@ func (c *Configuration) FindSystem(key string) string {
77
77
return output
78
78
}
79
79
80
- // Find returns the git config value for the key
80
+ // FindLocal returns the git config value in local scope for the key
81
81
func (c * Configuration ) FindLocal (key string ) string {
82
82
output , _ := c .gitConfig ("--local" , key )
83
83
return output
@@ -93,6 +93,11 @@ func (c *Configuration) SetSystem(key, val string) (string, error) {
93
93
return c .gitConfigWrite ("--system" , "--replace-all" , key , val )
94
94
}
95
95
96
+ // SetLocal sets the git config value for the key in the specified config file
97
+ func (c * Configuration ) SetLocal (key , val string ) (string , error ) {
98
+ return c .gitConfigWrite ("--replace-all" , key , val )
99
+ }
100
+
96
101
// UnsetGlobalSection removes the entire named section from the global config
97
102
func (c * Configuration ) UnsetGlobalSection (key string ) (string , error ) {
98
103
return c .gitConfigWrite ("--global" , "--remove-section" , key )
@@ -103,16 +108,11 @@ func (c *Configuration) UnsetSystemSection(key string) (string, error) {
103
108
return c .gitConfigWrite ("--system" , "--remove-section" , key )
104
109
}
105
110
106
- // UnsetLocalSection removes the entire named section from the system config
111
+ // UnsetLocalSection removes the entire named section from the local config
107
112
func (c * Configuration ) UnsetLocalSection (key string ) (string , error ) {
108
113
return c .gitConfigWrite ("--local" , "--remove-section" , key )
109
114
}
110
115
111
- // SetLocal sets the git config value for the key in the specified config file
112
- func (c * Configuration ) SetLocal (key , val string ) (string , error ) {
113
- return c .gitConfigWrite ("--replace-all" , key , val )
114
- }
115
-
116
116
// UnsetLocalKey removes the git config value for the key from the specified config file
117
117
func (c * Configuration ) UnsetLocalKey (key string ) (string , error ) {
118
118
return c .gitConfigWrite ("--unset" , key )
0 commit comments