File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,12 @@ def reset_hard(commitish = nil, opts = {})
281
281
end
282
282
283
283
284
- # cleans the working directory, removing directories, too.
284
+ # cleans the working directory
285
+ #
286
+ # options:
287
+ # :force
288
+ # :d
289
+ #
285
290
def clean ( opts = { } )
286
291
self . lib . clean ( opts )
287
292
end
Original file line number Diff line number Diff line change @@ -422,8 +422,10 @@ def reset(commit, opts = {})
422
422
end
423
423
424
424
def clean ( opts = { } )
425
- arr_opts = [ "--force" ] # Some configurations require a --force
426
- arr_opts << [ "-d" ] # Remove untracked directories in addition to untracked files.
425
+ arr_opts = [ ]
426
+ arr_opts << '--force' if opts [ :force ]
427
+ arr_opts << '-d' if opts [ :d ]
428
+
427
429
command ( 'clean' , arr_opts )
428
430
end
429
431
You can’t perform that action at this time.
0 commit comments