From 2ae5f6f97cd1cd79e3c0ef11da235ddc053a6186 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 23 Apr 2019 15:43:51 +0900 Subject: [PATCH] Add VCS::GIT#commit --- tool/vcs.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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