Sha256: fe1947f099f7062be0864fb9d817117ce908d89af71621da1817fcb458ccae7d

Contents?: true

Size: 483 Bytes

Versions: 1

Compression:

Stored size: 483 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'
  default_branch = git.get_default_branch
  if git.get_branch == default_branch
    puts "Error: Cannot rebase #{default_branch}!"
    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.5.0 exe/lgit