summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-23 15:43:51 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-23 15:43:51 +0900
commit2ae5f6f97cd1cd79e3c0ef11da235ddc053a6186 (patch)
treecb90846d2068a2e22278eb2a8c43ca75bf51c51a /tool/vcs.rb
parent2fb83a0af7a49788e80c55fd324dfa8e046cd9d9 (diff)
Add VCS::GIT#commit
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index fe81df8..d4fea1e 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -484,6 +484,15 @@ class VCS
end
end
end
+
+ def commit(opts = {})
+ dryrun = opts.fetch(:dryrun) {$DEBUG} if opts
+ args = [COMMAND]
+ args << "-n" if dryrun
+ args << "push"
+ system(*args) or return false
+ true
+ end
end
class GITSVN < GIT