Sha256: 1a0dab3f8ee51c8a77c9902bf04bd5c92e1d709214c8abd319928b907053205a

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'lgit'

if ARGV.size.zero?
  puts 'Specify command'
  exit 1
end

git = Lgit::Git.new

case ARGV[0]
when 'branch'
  git.create_branch(ARGV[1], ARGV[2])
when 'rebase'
  if git.get_branch == 'master'
    puts 'Error: Cannot rebase master!'
    exit 2
  end
  git.rebase ARGV[1]
when 'delete-branches'
  git.delete_branches
else
  puts 'Invalid command'
  exit 3
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lgit-0.4.0 exe/lgit