aboutsummaryrefslogtreecommitdiffstats
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
parent2fb83a0af7a49788e80c55fd324dfa8e046cd9d9 (diff)
downloadruby-2ae5f6f97cd1cd79e3c0ef11da235ddc053a6186.tar.gz
Add VCS::GIT#commit
-rw-r--r--tool/vcs.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index fe81df871b..d4fea1e210 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