Skip to content

Commit 3951c2f

Browse files
committed
Default gist.copy to "on", since that's historically what it has done.
1 parent d9668ff commit 3951c2f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

gist

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,20 @@ private
266266
def defaults
267267
extension = config("gist.extension")
268268
extension = nil if extension && extension.empty?
269+
270+
copy = config("gist.copy")
271+
if copy.nil?
272+
copy = true
273+
else
274+
# match optparse boolean true states
275+
copy = copy =~ /^(true)|(on)|(\+)/
276+
end
269277

270278
return {
271279
"private" => config("gist.private"),
272280
"browse" => config("gist.browse"),
273281
"extension" => extension,
274-
"copy" => config("gist.copy"),
282+
"copy" => copy,
275283
}
276284
end
277285

0 commit comments

Comments
 (0)