git-prune-remote-branch 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 538520f6e621eeae7412f4d2e49bc5ea7e10c064
4
+ data.tar.gz: 86ec169de7d7f201487534eeea367fdf2e0bb10e
5
+ SHA512:
6
+ metadata.gz: 3a98a86239eb5ed1e620de5f6dcd1f1e59037631120a9828644b450bb5219b35bbd826603d8eed55985ca434a3c4bb04f3c9897926aa72e0617d69a9534c89ec
7
+ data.tar.gz: 4fe2a899d64f8a0063abda3ef8594ee7ca9a3ad6bca5501c6d044f63ea3492533a0ada2852e893103bbc0bc23c2f3a3ce3b6b39fc5d58bd774bb03de3ec61142
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # git-prune-remote-branch
2
+
3
+ Delete all remote branches which merged into master or develop.
4
+
5
+ $ git clone git://github.com/kyanny/git-prune-remote-branch.git
6
+ $ export PATH=/path/to/git-prune-remote-branch:$PATH
7
+ $ cd $GIT_DIR
8
+ $ git-prune-remote-branch --help
9
+ $ git-prune-remote-branch --noop
10
+
11
+ http://kyanny.mit-license.org/
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+
4
+ opts = OptionParser.new
5
+ opts.on('--noop', 'dry-run mode') { |v| $noop = true }
6
+ opts.parse!
7
+
8
+ `git branch -r`.each_line do |branch|
9
+ branch.strip!.chomp!
10
+ next if branch =~ %r![^/]+/master!
11
+ next if branch =~ %r![^/]+/develop!
12
+
13
+ if `git branch --contains #{branch}`.each_line.any? { |included| included.strip.chomp =~ /\A[* ]*(develop|master)\z/ }
14
+ ref = branch.sub(%r!^([^/]+)/!, '')
15
+ command = "git push --delete #{$1} #{ref}"
16
+ puts command
17
+ unless $noop
18
+ system command
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "git-prune-remote-branch"
3
+ spec.version = '1.0.0'
4
+ spec.authors = ["Kensuke Nagae", "KITAITI Makoto"]
5
+ spec.email = ["kyanny@gmail.com"]
6
+ spec.description = %q{git-prune-remote-branch}
7
+ spec.summary = %q{git-prune-remote-branch}
8
+ spec.homepage = "https://github.com/kyanny/git-prune-remote-branch"
9
+ spec.license = "MIT"
10
+
11
+ spec.bindir = "."
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.executables = ["git-prune-remote-branch"]
14
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: git-prune-remote-branch
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kensuke Nagae
8
+ - KITAITI Makoto
9
+ autorequire:
10
+ bindir: "."
11
+ cert_chain: []
12
+ date: 2014-05-03 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: git-prune-remote-branch
15
+ email:
16
+ - kyanny@gmail.com
17
+ executables:
18
+ - git-prune-remote-branch
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - "./git-prune-remote-branch"
23
+ - README.md
24
+ - Rakefile
25
+ - git-prune-remote-branch
26
+ - git-prune-remote-branch.gemspec
27
+ homepage: https://github.com/kyanny/git-prune-remote-branch
28
+ licenses:
29
+ - MIT
30
+ metadata: {}
31
+ post_install_message:
32
+ rdoc_options: []
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubyforge_project:
47
+ rubygems_version: 2.2.0
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: git-prune-remote-branch
51
+ test_files: []
52
+ has_rdoc: