git-multi 5.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.pryrc +3 -1
- data/.rubocop.yml +11 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +53 -25
- data/README.md +2 -0
- data/bin/console +3 -0
- data/exe/git-multi +5 -5
- data/git-multi.gemspec +13 -1
- data/lib/ext/string.rb +0 -2
- data/lib/git/hub.rb +22 -22
- data/lib/git/multi/commands.rb +1 -1
- data/lib/git/multi/report.rb +9 -9
- data/lib/git/multi/version.rb +1 -1
- data/lib/git/multi.rb +5 -5
- data/man/git-multi.1 +59 -30
- data/man/git-multi.erb +13 -0
- data/man/git-multi.html +48 -29
- metadata +40 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9c0aa5b5dc19107281de9fe6c8dae2d956f77954b7f645f70102d2d693a69bd
|
4
|
+
data.tar.gz: b5033965b46ce4c2d4a7d781d3e1efa55a6b3f87f63563fde4e913461bcac1f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f76f76d736d13581e3a280118a4ec112cfeb8239a0ebb91d708ad22704b384d5ee0b85e1cd231af76e536ce0903953eaafc7d04e45073606d32b0f3d2ac6dd3a
|
7
|
+
data.tar.gz: 8b1fb3fe50001711983dbc9e998af763a6d5c8c57cdea814bb7bc2d5e7a1828e5291d0f0630f3cd69b30140334091fd318708fe2099bb50639f32d79c2303bbd
|
data/.gitignore
CHANGED
data/.pryrc
CHANGED
@@ -4,11 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'git/multi'
|
5
5
|
|
6
6
|
# this loads all 'git multi' contribs
|
7
|
+
# rubocop:disable Lint/NonDeterministicRequireOrder
|
7
8
|
Dir.glob File.join(__dir__, 'contrib', '**', '*.rb'), &method(:require)
|
9
|
+
# rubocop:enable Lint/NonDeterministicRequireOrder
|
8
10
|
|
9
11
|
# configure a logger
|
10
12
|
require 'logger'
|
11
|
-
logger = Logger.new(
|
13
|
+
logger = Logger.new($stdout)
|
12
14
|
logger.level = Logger::INFO
|
13
15
|
|
14
16
|
# configure Octokit middleware with logger
|
data/.rubocop.yml
CHANGED
@@ -6,6 +6,10 @@ AllCops:
|
|
6
6
|
- 'tmp/*'
|
7
7
|
- 'pkg/*'
|
8
8
|
|
9
|
+
require:
|
10
|
+
- rubocop-minitest
|
11
|
+
- rubocop-rake
|
12
|
+
|
9
13
|
Layout/LineLength:
|
10
14
|
Enabled: false
|
11
15
|
|
@@ -19,6 +23,9 @@ Metrics/MethodLength:
|
|
19
23
|
Metrics/ModuleLength:
|
20
24
|
Enabled: false
|
21
25
|
|
26
|
+
Rake/Desc:
|
27
|
+
Enabled: false
|
28
|
+
|
22
29
|
Style/BlockDelimiters:
|
23
30
|
Enabled: false
|
24
31
|
Style/Documentation:
|
@@ -38,3 +45,7 @@ Style/TrailingCommaInArrayLiteral:
|
|
38
45
|
Enabled: false
|
39
46
|
Style/TrailingCommaInHashLiteral:
|
40
47
|
Enabled: false
|
48
|
+
|
49
|
+
# https://github.com/rubocop/rubocop/issues/10394
|
50
|
+
Style/SwapValues:
|
51
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.9
|
data/Gemfile.lock
CHANGED
@@ -1,56 +1,82 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git-multi (
|
4
|
+
git-multi (6.0.0)
|
5
5
|
faraday (~> 1)
|
6
6
|
octokit (~> 4)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
11
|
+
addressable (2.8.0)
|
12
12
|
public_suffix (>= 2.0.2, < 5.0)
|
13
|
-
ast (2.4.
|
13
|
+
ast (2.4.2)
|
14
14
|
coderay (1.1.3)
|
15
|
-
faraday (1.
|
15
|
+
faraday (1.9.3)
|
16
|
+
faraday-em_http (~> 1.0)
|
17
|
+
faraday-em_synchrony (~> 1.0)
|
18
|
+
faraday-excon (~> 1.1)
|
19
|
+
faraday-httpclient (~> 1.0)
|
20
|
+
faraday-multipart (~> 1.0)
|
21
|
+
faraday-net_http (~> 1.0)
|
22
|
+
faraday-net_http_persistent (~> 1.0)
|
23
|
+
faraday-patron (~> 1.0)
|
24
|
+
faraday-rack (~> 1.0)
|
25
|
+
faraday-retry (~> 1.0)
|
26
|
+
ruby2_keywords (>= 0.0.4)
|
27
|
+
faraday-em_http (1.0.0)
|
28
|
+
faraday-em_synchrony (1.0.0)
|
29
|
+
faraday-excon (1.1.0)
|
30
|
+
faraday-httpclient (1.0.1)
|
31
|
+
faraday-multipart (1.0.3)
|
16
32
|
multipart-post (>= 1.2, < 3)
|
33
|
+
faraday-net_http (1.0.1)
|
34
|
+
faraday-net_http_persistent (1.2.0)
|
35
|
+
faraday-patron (1.0.0)
|
36
|
+
faraday-rack (1.0.0)
|
37
|
+
faraday-retry (1.0.3)
|
17
38
|
interception (0.5)
|
18
39
|
method_source (1.0.0)
|
19
|
-
minitest (5.
|
40
|
+
minitest (5.15.0)
|
20
41
|
multipart-post (2.1.1)
|
21
|
-
octokit (4.
|
42
|
+
octokit (4.22.0)
|
22
43
|
faraday (>= 0.9)
|
23
44
|
sawyer (~> 0.8.0, >= 0.5.3)
|
24
|
-
parallel (1.
|
25
|
-
parser (
|
45
|
+
parallel (1.21.0)
|
46
|
+
parser (3.1.0.0)
|
26
47
|
ast (~> 2.4.1)
|
27
|
-
pry (0.
|
48
|
+
pry (0.14.1)
|
28
49
|
coderay (~> 1.1)
|
29
50
|
method_source (~> 1.0)
|
30
|
-
pry-rescue (1.5.
|
51
|
+
pry-rescue (1.5.2)
|
31
52
|
interception (>= 0.5)
|
32
53
|
pry (>= 0.12.0)
|
33
|
-
public_suffix (4.0.
|
34
|
-
rainbow (3.
|
35
|
-
rake (13.0.
|
36
|
-
regexp_parser (
|
37
|
-
rexml (3.2.
|
38
|
-
rubocop (
|
54
|
+
public_suffix (4.0.6)
|
55
|
+
rainbow (3.1.1)
|
56
|
+
rake (13.0.6)
|
57
|
+
regexp_parser (2.2.0)
|
58
|
+
rexml (3.2.5)
|
59
|
+
rubocop (1.25.0)
|
39
60
|
parallel (~> 1.10)
|
40
|
-
parser (>=
|
61
|
+
parser (>= 3.1.0.0)
|
41
62
|
rainbow (>= 2.2.2, < 4.0)
|
42
|
-
regexp_parser (>= 1.
|
63
|
+
regexp_parser (>= 1.8, < 3.0)
|
43
64
|
rexml
|
44
|
-
rubocop-ast (>=
|
65
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
45
66
|
ruby-progressbar (~> 1.7)
|
46
|
-
unicode-display_width (>= 1.4.0, <
|
47
|
-
rubocop-ast (
|
48
|
-
parser (>=
|
49
|
-
|
67
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
68
|
+
rubocop-ast (1.15.1)
|
69
|
+
parser (>= 3.0.1.1)
|
70
|
+
rubocop-minitest (0.17.1)
|
71
|
+
rubocop (>= 0.90, < 2.0)
|
72
|
+
rubocop-rake (0.6.0)
|
73
|
+
rubocop (~> 1.0)
|
74
|
+
ruby-progressbar (1.11.0)
|
75
|
+
ruby2_keywords (0.0.5)
|
50
76
|
sawyer (0.8.2)
|
51
77
|
addressable (>= 2.3.5)
|
52
78
|
faraday (> 0.8, < 2.0)
|
53
|
-
unicode-display_width (1.
|
79
|
+
unicode-display_width (2.1.0)
|
54
80
|
|
55
81
|
PLATFORMS
|
56
82
|
ruby
|
@@ -63,6 +89,8 @@ DEPENDENCIES
|
|
63
89
|
pry-rescue
|
64
90
|
rake
|
65
91
|
rubocop
|
92
|
+
rubocop-minitest
|
93
|
+
rubocop-rake
|
66
94
|
|
67
95
|
BUNDLED WITH
|
68
|
-
2.
|
96
|
+
2.3.6
|
data/README.md
CHANGED
@@ -35,6 +35,8 @@ There are plenty of other utilities out there that do something similar, but typ
|
|
35
35
|
|
36
36
|
## Usage
|
37
37
|
|
38
|
+
Installing the gem installs the `git-multi` executable on your system's `${PATH}`, which means it can be run as a so-called [git subcommand](https://git.github.io/htmldocs/howto/new-command.html#:~:text=Runtime%20environment), as follows: `git multi`; a good starting point is:
|
39
|
+
|
38
40
|
$ git multi --help
|
39
41
|
|
40
42
|
## Known Issues
|
data/bin/console
CHANGED
data/exe/git-multi
CHANGED
@@ -6,11 +6,11 @@ require 'git/multi'
|
|
6
6
|
|
7
7
|
multi_repo = command = nil
|
8
8
|
|
9
|
-
if
|
10
|
-
# read list of repo full names from
|
11
|
-
multi_repo =
|
12
|
-
# reopen
|
13
|
-
|
9
|
+
if !$stdin.tty?
|
10
|
+
# read list of repo full names from $stdin (~pseudo multi-repo)
|
11
|
+
multi_repo = $stdin.readlines.map(&:strip).map(&:freeze).freeze
|
12
|
+
# reopen $stdin (to ensure all `Kernel.system` based cmds work)
|
13
|
+
$stdin.reopen('/dev/tty')
|
14
14
|
elsif (command = ARGV.shift)&.start_with?('++')
|
15
15
|
multi_repo = command.delete('++')
|
16
16
|
command = nil
|
data/git-multi.gemspec
CHANGED
@@ -14,7 +14,17 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = 'https://github.com/pvdb/git-multi'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.
|
17
|
+
spec.required_ruby_version = ['>= 2.6.0', '< 2.7.0']
|
18
|
+
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
21
|
+
spec.metadata['changelog_uri'] = File.join(spec.homepage, 'blob', 'master', 'README.md')
|
22
|
+
|
23
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
18
28
|
`git ls-files -z`
|
19
29
|
.split("\x0")
|
20
30
|
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -34,4 +44,6 @@ Gem::Specification.new do |spec|
|
|
34
44
|
spec.add_development_dependency 'pry-rescue'
|
35
45
|
spec.add_development_dependency 'rake'
|
36
46
|
spec.add_development_dependency 'rubocop'
|
47
|
+
spec.add_development_dependency 'rubocop-minitest'
|
48
|
+
spec.add_development_dependency 'rubocop-rake'
|
37
49
|
end
|
data/lib/ext/string.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
class String
|
2
|
-
# rubocop:disable Layout/EmptyLineBetweenDefs
|
3
2
|
# rubocop:disable Style/SingleLineMethods
|
4
3
|
def colorize(color_code) "\e[#{color_code}m#{self}\e[0m"; end
|
5
4
|
|
@@ -12,5 +11,4 @@ class String
|
|
12
11
|
|
13
12
|
def undent() gsub(/^.{#{slice(/^ +/).length}}/, ''); end
|
14
13
|
# rubocop:enable Style/SingleLineMethods
|
15
|
-
# rubocop:enable Layout/EmptyLineBetweenDefs
|
16
14
|
end
|
data/lib/git/hub.rb
CHANGED
@@ -4,7 +4,7 @@ begin
|
|
4
4
|
require 'net/http/persistent'
|
5
5
|
if Octokit.middleware.adapter == Faraday::Adapter::NetHttp
|
6
6
|
adapter = Faraday::RackBuilder::Handler.new(Faraday::Adapter::NetHttpPersistent)
|
7
|
-
Octokit.middleware.instance_variable_set(
|
7
|
+
Octokit.middleware.instance_variable_set(:@adapter, adapter)
|
8
8
|
end
|
9
9
|
rescue LoadError
|
10
10
|
# NOOP - `Net::HTTP::Persistent` is optional, so
|
@@ -29,31 +29,31 @@ module Git
|
|
29
29
|
|
30
30
|
def connected?
|
31
31
|
@connected ||= begin
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
client.validate_credentials
|
33
|
+
true
|
34
|
+
rescue Faraday::ConnectionFailed
|
35
|
+
false
|
36
|
+
end
|
37
37
|
end
|
38
38
|
|
39
39
|
# FIXME: update login as part of `--refresh`
|
40
40
|
|
41
41
|
def login
|
42
42
|
@login ||= begin
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
client.user.login
|
44
|
+
rescue Octokit::Unauthorized, Faraday::ConnectionFailed
|
45
|
+
nil
|
46
|
+
end
|
47
47
|
end
|
48
48
|
|
49
49
|
# FIXME: update orgs as part of `--refresh`
|
50
50
|
|
51
51
|
def orgs
|
52
52
|
@orgs ||= begin
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
client.organizations.map(&:login)
|
54
|
+
rescue Octokit::Unauthorized, Faraday::ConnectionFailed
|
55
|
+
[]
|
56
|
+
end
|
57
57
|
end
|
58
58
|
|
59
59
|
# pick a (semi-)random repo from GitHub
|
@@ -76,10 +76,10 @@ module Git
|
|
76
76
|
|
77
77
|
@user_repositories = Hash.new { |repos, (user, type)|
|
78
78
|
repos[[user, type]] = begin
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
client
|
80
|
+
.repositories(user, type: type)
|
81
|
+
.sort_by { |repo| repo[:name].downcase }
|
82
|
+
end
|
83
83
|
}
|
84
84
|
|
85
85
|
def user_repositories(user, type = :owner)
|
@@ -93,10 +93,10 @@ module Git
|
|
93
93
|
|
94
94
|
@org_repositories = Hash.new { |repos, (org, type)|
|
95
95
|
repos[[org, type]] = begin
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
96
|
+
client
|
97
|
+
.org_repositories(org, type: type)
|
98
|
+
.sort_by { |repo| repo[:name].downcase }
|
99
|
+
end
|
100
100
|
}
|
101
101
|
|
102
102
|
def org_repositories(org, type = :owner)
|
data/lib/git/multi/commands.rb
CHANGED
data/lib/git/multi/report.rb
CHANGED
@@ -33,7 +33,7 @@ module Git
|
|
33
33
|
setting_status(["\tGitHub ", "#{github_count} repositories"])
|
34
34
|
setting_status(["\tcloned ", cloned_count, "(#{missing_count} missing)"])
|
35
35
|
Git::Multi.missing_repositories_for(owner).each do |missing|
|
36
|
-
setting_status(["\tmissing", missing.full_name], false, false)
|
36
|
+
setting_status(["\tmissing", missing.full_name], valid: false, optional: false)
|
37
37
|
end
|
38
38
|
setting_status(["\tsubdirs", subdir_count, "(#{surplus_count} surplus)"])
|
39
39
|
end
|
@@ -42,14 +42,14 @@ module Git
|
|
42
42
|
github_count = Git::Multi.repositories_for(superproject).count
|
43
43
|
|
44
44
|
if github_count.zero?
|
45
|
-
setting_status([message, 'listed but not configured'], false, false)
|
45
|
+
setting_status([message, 'listed but not configured'], valid: false, optional: false)
|
46
46
|
else
|
47
47
|
setting_status([message], true)
|
48
48
|
Git::Multi.repositories_for(superproject).each do |repo|
|
49
49
|
if File.directory? repo.local_path
|
50
|
-
setting_status(["\tcloned ", repo.full_name], true)
|
50
|
+
setting_status(["\tcloned ", repo.full_name], valid: true)
|
51
51
|
else
|
52
|
-
setting_status(["\tmissing", repo.full_name], false, false)
|
52
|
+
setting_status(["\tmissing", repo.full_name], valid: false, optional: false)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -102,7 +102,7 @@ module Git
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
105
|
-
private_class_method def setting_status(messages, valid
|
105
|
+
private_class_method def setting_status(messages, valid: false, optional: true)
|
106
106
|
fields = messages.compact.join(' - ')
|
107
107
|
icon = valid ? TICK : optional ? ARROW : CROSS
|
108
108
|
puts "#{icon} #{fields}"
|
@@ -115,16 +115,16 @@ module Git
|
|
115
115
|
abbreviate(file),
|
116
116
|
File.file?(file) ? "#{File.size(file).commify} bytes" : nil,
|
117
117
|
],
|
118
|
-
file && !file.empty? && File.file?(file),
|
119
|
-
false
|
118
|
+
valid: file && !file.empty? && File.file?(file),
|
119
|
+
optional: false,
|
120
120
|
)
|
121
121
|
end
|
122
122
|
|
123
123
|
private_class_method def directory_status(messages, directory)
|
124
124
|
setting_status(
|
125
125
|
messages,
|
126
|
-
directory && !directory.empty? && File.directory?(directory),
|
127
|
-
false
|
126
|
+
valid: directory && !directory.empty? && File.directory?(directory),
|
127
|
+
optional: false,
|
128
128
|
)
|
129
129
|
end
|
130
130
|
end
|
data/lib/git/multi/version.rb
CHANGED
data/lib/git/multi.rb
CHANGED
@@ -148,15 +148,15 @@ module Git
|
|
148
148
|
else Dir.pwd
|
149
149
|
end
|
150
150
|
Dir.chdir(working_dir) do
|
151
|
-
if
|
152
|
-
|
151
|
+
if $stdout.tty? && $stderr.tty?
|
152
|
+
$stdout.puts "#{full_name.invert} (#{fractional_index})"
|
153
153
|
interactive.call(self)
|
154
|
-
elsif
|
154
|
+
elsif $stderr.tty? && captured
|
155
155
|
errors = File.join(ENV['TMPDIR'], "git-multi.#{$PID}")
|
156
156
|
captured.call(self, errors)
|
157
157
|
if File.exist?(errors) && !File.zero?(errors)
|
158
158
|
# rubocop:disable Style/StderrPuts
|
159
|
-
|
159
|
+
$stderr.puts "#{full_name.invert} (#{fractional_index})"
|
160
160
|
Kernel.system "cat #{errors} > /dev/tty ;"
|
161
161
|
# rubocop:enable Style/StderrPuts
|
162
162
|
end
|
@@ -195,7 +195,7 @@ module Git
|
|
195
195
|
repo.local_path = Pathname.new(File.join(WORKAREA, repo.full_name))
|
196
196
|
repo.fractional_index = "#{index + 1}/#{repos.count}"
|
197
197
|
# fix 'repo' => https://github.com/octokit/octokit.rb/issues/727
|
198
|
-
repo.compliant_ssh_url =
|
198
|
+
repo.compliant_ssh_url = "ssh://#{repo.ssh_url.split(':', 2).join('/')}"
|
199
199
|
# remove optional '.git' suffix from 'git@github.com:pvdb/git-multi.git'
|
200
200
|
repo.abbreviated_ssh_url = repo.ssh_url.chomp('.git')
|
201
201
|
# extend 'repo' with 'just do it' capabilities
|
data/man/git-multi.1
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
.\" Title: git-multi
|
3
3
|
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
|
4
4
|
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
5
|
-
.\" Date:
|
5
|
+
.\" Date: 02/02/2022
|
6
6
|
.\" Manual: Git Manual
|
7
|
-
.\" Source: Git 2.
|
7
|
+
.\" Source: Git 2.35.1.4.g5d01301f2b.dirty
|
8
8
|
.\" Language: English
|
9
9
|
.\"
|
10
|
-
.TH "GIT\-MULTI" "1" "
|
10
|
+
.TH "GIT\-MULTI" "1" "02/02/2022" "Git 2\&.35\&.1\&.4\&.g5d01301f" "Git Manual"
|
11
11
|
.\" -----------------------------------------------------------------
|
12
12
|
.\" * Define some portability stuff
|
13
13
|
.\" -----------------------------------------------------------------
|
@@ -31,7 +31,7 @@
|
|
31
31
|
git-multi \- execute the same git command in multiple repositories
|
32
32
|
.SH "VERSION"
|
33
33
|
.sp
|
34
|
-
This is \
|
34
|
+
This is \fBv6\&.0\&.0\fR of \fIgit multi\fR \&... hooray!
|
35
35
|
.SH "SYNOPSIS"
|
36
36
|
.sp
|
37
37
|
There are some options for \fBgit multi\fR itself, in which case it is invoked as follows:
|
@@ -490,32 +490,34 @@ The following is a list of valid arguments for the \fBgit multi \-\-query\fR opt
|
|
490
490
|
.RS 4
|
491
491
|
.\}
|
492
492
|
.nf
|
493
|
-
archive_url archived
|
494
|
-
blobs_url branches_url
|
495
|
-
collaborators_url comments_url
|
496
|
-
compare_url contents_url
|
497
|
-
created_at default_branch
|
498
|
-
description disabled
|
499
|
-
events_url fork
|
500
|
-
forks_count forks_url
|
501
|
-
git_commits_url git_refs_url
|
502
|
-
git_url has_downloads
|
503
|
-
has_pages has_projects
|
504
|
-
homepage hooks_url
|
505
|
-
id
|
506
|
-
issues_url
|
507
|
-
language
|
508
|
-
merges_url
|
509
|
-
name
|
510
|
-
notifications_url
|
511
|
-
organization
|
512
|
-
private
|
513
|
-
releases_url
|
514
|
-
stargazers_count
|
515
|
-
subscribers_count
|
516
|
-
svn_url
|
517
|
-
temp_clone_token
|
518
|
-
|
493
|
+
allow_forking archive_url archived
|
494
|
+
assignees_url blobs_url branches_url
|
495
|
+
clone_url collaborators_url comments_url
|
496
|
+
commits_url compare_url contents_url
|
497
|
+
contributors_url created_at default_branch
|
498
|
+
deployments_url description disabled
|
499
|
+
downloads_url events_url fork
|
500
|
+
forks forks_count forks_url
|
501
|
+
full_name git_commits_url git_refs_url
|
502
|
+
git_tags_url git_url has_downloads
|
503
|
+
has_issues has_pages has_projects
|
504
|
+
has_wiki homepage hooks_url
|
505
|
+
html_url id is_template
|
506
|
+
issue_comment_url issue_events_url issues_url
|
507
|
+
keys_url labels_url language
|
508
|
+
languages_url license merges_url
|
509
|
+
milestones_url mirror_url name
|
510
|
+
network_count node_id notifications_url
|
511
|
+
open_issues open_issues_count organization
|
512
|
+
owner permissions private
|
513
|
+
pulls_url pushed_at releases_url
|
514
|
+
size ssh_url stargazers_count
|
515
|
+
stargazers_url statuses_url subscribers_count
|
516
|
+
subscribers_url subscription_url svn_url
|
517
|
+
tags_url teams_url temp_clone_token
|
518
|
+
topics trees_url updated_at
|
519
|
+
url visibility watchers
|
520
|
+
watchers_count
|
519
521
|
.fi
|
520
522
|
.if n \{\
|
521
523
|
.RE
|
@@ -545,6 +547,33 @@ git multi \-\-json | jq \-r \*(Aq\&.[] | select(\&.fork == true) | \&.full_name\
|
|
545
547
|
.if n \{\
|
546
548
|
.RE
|
547
549
|
.\}
|
550
|
+
.SH "CHAINED INVOCATION"
|
551
|
+
.sp
|
552
|
+
When \fBgit multi\fR gets its input from a Unix pipeline \fI(as opposed to from a TTY)\fR, it constructs an "implicit" multi repo comprised of the "full" repo names it reads from \fBSTDIN\fR \fI(one full repo name per line)\fR\&.
|
553
|
+
.sp
|
554
|
+
This allows multiple \fBgit multi\fR invocations to be chained, for example by using the \fB\-\-json\fR or \fB\-\-find\fR options as follows:
|
555
|
+
.sp
|
556
|
+
.if n \{\
|
557
|
+
.RS 4
|
558
|
+
.\}
|
559
|
+
.nf
|
560
|
+
# run a git query or subcommand on repos that aren\*(Aqt archived (on GitHub)
|
561
|
+
git multi ++<multi_repo> \-\-json | jq \-r \*(Aq\&.[] | select(\&."archived" == false) | \&."full_name"\*(Aq | git multi <git_command>
|
562
|
+
.fi
|
563
|
+
.if n \{\
|
564
|
+
.RE
|
565
|
+
.\}
|
566
|
+
.sp
|
567
|
+
.if n \{\
|
568
|
+
.RS 4
|
569
|
+
.\}
|
570
|
+
.nf
|
571
|
+
# run a shell command inside repos that have Ruby as their main language
|
572
|
+
git multi ++<multi_repo> \-\-find \*(Aqlanguage == "Ruby"\*(Aq | git multi \-\-raw \*(Aqcat \&.ruby\-version\*(Aq
|
573
|
+
.fi
|
574
|
+
.if n \{\
|
575
|
+
.RE
|
576
|
+
.\}
|
548
577
|
.SH "FILES"
|
549
578
|
.PP
|
550
579
|
\fB${HOME}/Workarea\fR
|
data/man/git-multi.erb
CHANGED
@@ -246,6 +246,19 @@ are some examples:
|
|
246
246
|
# print out the name of all "forked" repositories
|
247
247
|
git multi --json | jq -r '.[] | select(.fork == true) | .full_name'
|
248
248
|
|
249
|
+
CHAINED INVOCATION
|
250
|
+
------------------
|
251
|
+
|
252
|
+
When `git multi` gets its input from a Unix pipeline _(as opposed to from a TTY)_, it constructs an "implicit" multi repo comprised of the "full" repo names it reads from `STDIN` _(one full repo name per line)_.
|
253
|
+
|
254
|
+
This allows multiple `git multi` invocations to be chained, for example by using the `--json` or `--find` options as follows:
|
255
|
+
|
256
|
+
# run a git query or subcommand on repos that aren't archived (on GitHub)
|
257
|
+
git multi ++<multi_repo> --json | jq -r '.[] | select(."archived" == false) | ."full_name"' | git multi <git_command>
|
258
|
+
|
259
|
+
# run a shell command inside repos that have Ruby as their main language
|
260
|
+
git multi ++<multi_repo> --find 'language == "Ruby"' | git multi --raw 'cat .ruby-version'
|
261
|
+
|
249
262
|
FILES
|
250
263
|
-----
|
251
264
|
|
data/man/git-multi.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
5
5
|
<head>
|
6
6
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
7
|
-
<meta name="generator" content="AsciiDoc
|
7
|
+
<meta name="generator" content="AsciiDoc 10.1.1" />
|
8
8
|
<title>git-multi(1)</title>
|
9
9
|
<style type="text/css">
|
10
10
|
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
@@ -748,7 +748,7 @@ git-multi(1) Manual Page
|
|
748
748
|
<div class="sect1">
|
749
749
|
<h2 id="_version">VERSION</h2>
|
750
750
|
<div class="sectionbody">
|
751
|
-
<div class="paragraph"><p>This is <code>
|
751
|
+
<div class="paragraph"><p>This is <code>v6.0.0</code> of <em>git multi</em> … hooray!</p></div>
|
752
752
|
</div>
|
753
753
|
</div>
|
754
754
|
<div class="sect1">
|
@@ -1113,32 +1113,34 @@ and cached locally <em>(in binary format)</em> for performance and offline usage
|
|
1113
1113
|
<div class="paragraph"><p>The following is a list of valid arguments for the <code>git multi --query</code> option:</p></div>
|
1114
1114
|
<div class="literalblock">
|
1115
1115
|
<div class="content">
|
1116
|
-
<pre><code>archive_url archived
|
1117
|
-
blobs_url branches_url
|
1118
|
-
collaborators_url comments_url
|
1119
|
-
compare_url contents_url
|
1120
|
-
created_at default_branch
|
1121
|
-
description disabled
|
1122
|
-
events_url fork
|
1123
|
-
forks_count forks_url
|
1124
|
-
git_commits_url git_refs_url
|
1125
|
-
git_url has_downloads
|
1126
|
-
has_pages has_projects
|
1127
|
-
homepage hooks_url
|
1128
|
-
id
|
1129
|
-
issues_url
|
1130
|
-
language
|
1131
|
-
merges_url
|
1132
|
-
name
|
1133
|
-
notifications_url
|
1134
|
-
organization
|
1135
|
-
private
|
1136
|
-
releases_url
|
1137
|
-
stargazers_count
|
1138
|
-
subscribers_count
|
1139
|
-
svn_url
|
1140
|
-
temp_clone_token
|
1141
|
-
|
1116
|
+
<pre><code>allow_forking archive_url archived
|
1117
|
+
assignees_url blobs_url branches_url
|
1118
|
+
clone_url collaborators_url comments_url
|
1119
|
+
commits_url compare_url contents_url
|
1120
|
+
contributors_url created_at default_branch
|
1121
|
+
deployments_url description disabled
|
1122
|
+
downloads_url events_url fork
|
1123
|
+
forks forks_count forks_url
|
1124
|
+
full_name git_commits_url git_refs_url
|
1125
|
+
git_tags_url git_url has_downloads
|
1126
|
+
has_issues has_pages has_projects
|
1127
|
+
has_wiki homepage hooks_url
|
1128
|
+
html_url id is_template
|
1129
|
+
issue_comment_url issue_events_url issues_url
|
1130
|
+
keys_url labels_url language
|
1131
|
+
languages_url license merges_url
|
1132
|
+
milestones_url mirror_url name
|
1133
|
+
network_count node_id notifications_url
|
1134
|
+
open_issues open_issues_count organization
|
1135
|
+
owner permissions private
|
1136
|
+
pulls_url pushed_at releases_url
|
1137
|
+
size ssh_url stargazers_count
|
1138
|
+
stargazers_url statuses_url subscribers_count
|
1139
|
+
subscribers_url subscription_url svn_url
|
1140
|
+
tags_url teams_url temp_clone_token
|
1141
|
+
topics trees_url updated_at
|
1142
|
+
url visibility watchers
|
1143
|
+
watchers_count</code></pre>
|
1142
1144
|
</div></div>
|
1143
1145
|
</div>
|
1144
1146
|
</div>
|
@@ -1162,6 +1164,23 @@ git multi --json | jq -r '.[] | select(.fork == true) | .full_name'</code></pre>
|
|
1162
1164
|
</div>
|
1163
1165
|
</div>
|
1164
1166
|
<div class="sect1">
|
1167
|
+
<h2 id="_chained_invocation">CHAINED INVOCATION</h2>
|
1168
|
+
<div class="sectionbody">
|
1169
|
+
<div class="paragraph"><p>When <code>git multi</code> gets its input from a Unix pipeline <em>(as opposed to from a TTY)</em>, it constructs an "implicit" multi repo comprised of the "full" repo names it reads from <code>STDIN</code> <em>(one full repo name per line)</em>.</p></div>
|
1170
|
+
<div class="paragraph"><p>This allows multiple <code>git multi</code> invocations to be chained, for example by using the <code>--json</code> or <code>--find</code> options as follows:</p></div>
|
1171
|
+
<div class="literalblock">
|
1172
|
+
<div class="content">
|
1173
|
+
<pre><code># run a git query or subcommand on repos that aren't archived (on GitHub)
|
1174
|
+
git multi ++<multi_repo> --json | jq -r '.[] | select(."archived" == false) | ."full_name"' | git multi <git_command></code></pre>
|
1175
|
+
</div></div>
|
1176
|
+
<div class="literalblock">
|
1177
|
+
<div class="content">
|
1178
|
+
<pre><code># run a shell command inside repos that have Ruby as their main language
|
1179
|
+
git multi ++<multi_repo> --find 'language == "Ruby"' | git multi --raw 'cat .ruby-version'</code></pre>
|
1180
|
+
</div></div>
|
1181
|
+
</div>
|
1182
|
+
</div>
|
1183
|
+
<div class="sect1">
|
1165
1184
|
<h2 id="_files">FILES</h2>
|
1166
1185
|
<div class="sectionbody">
|
1167
1186
|
<div class="dlist"><dl>
|
@@ -1222,7 +1241,7 @@ the <code>jq</code> command-line utility:
|
|
1222
1241
|
<div id="footer">
|
1223
1242
|
<div id="footer-text">
|
1224
1243
|
Last updated
|
1225
|
-
|
1244
|
+
2022-02-02 12:24:05 GMT
|
1226
1245
|
</div>
|
1227
1246
|
</div>
|
1228
1247
|
</body>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-multi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Vandenberk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -122,6 +122,34 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-minitest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
description: Run the same git command in a set of related repos
|
126
154
|
email:
|
127
155
|
- pvandenberk@mac.com
|
@@ -165,7 +193,11 @@ files:
|
|
165
193
|
homepage: https://github.com/pvdb/git-multi
|
166
194
|
licenses:
|
167
195
|
- MIT
|
168
|
-
metadata:
|
196
|
+
metadata:
|
197
|
+
homepage_uri: https://github.com/pvdb/git-multi
|
198
|
+
source_code_uri: https://github.com/pvdb/git-multi
|
199
|
+
changelog_uri: https://github.com/pvdb/git-multi/blob/master/README.md
|
200
|
+
rubygems_mfa_required: 'true'
|
169
201
|
post_install_message: "\nThe only required setting for \e[1mgit multi\e[0m is:\n\n\tgit
|
170
202
|
config --global --add \e[1mgithub.token\e[0m <your_github_oauth_token>\n\nThe following
|
171
203
|
settings for \e[1mgit multi\e[0m are\noptional, and take 0, 1 or more values:\n\n\tgit
|
@@ -181,14 +213,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
213
|
requirements:
|
182
214
|
- - ">="
|
183
215
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
216
|
+
version: 2.6.0
|
217
|
+
- - "<"
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 2.7.0
|
185
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
221
|
requirements:
|
187
222
|
- - ">="
|
188
223
|
- !ruby/object:Gem::Version
|
189
224
|
version: '0'
|
190
225
|
requirements: []
|
191
|
-
rubygems_version: 3.0.3
|
226
|
+
rubygems_version: 3.0.3.1
|
192
227
|
signing_key:
|
193
228
|
specification_version: 4
|
194
229
|
summary: The ultimate multi-repo utility for git!
|