git-multi 3.0.3 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.pryrc +13 -5
- data/.rubocop.yml +14 -7
- data/.ruby-version +1 -1
- data/Gemfile.lock +60 -27
- data/README.md +2 -0
- data/bin/console +3 -0
- data/exe/git-multi +48 -41
- data/git-multi.gemspec +14 -2
- data/lib/ext/dir.rb +3 -3
- data/lib/ext/string.rb +2 -6
- data/lib/git/hub.rb +25 -27
- data/lib/git/multi/commands.rb +2 -4
- data/lib/git/multi/config.rb +0 -2
- data/lib/git/multi/report.rb +11 -13
- data/lib/git/multi/version.rb +1 -1
- data/lib/git/multi.rb +12 -14
- data/man/git-multi.1 +63 -34
- data/man/git-multi.erb +16 -3
- data/man/git-multi.html +52 -33
- metadata +46 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
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
|
-
|
|
7
|
+
# rubocop:disable Lint/NonDeterministicRequireOrder
|
|
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
|
|
@@ -28,15 +30,21 @@ end
|
|
|
28
30
|
|
|
29
31
|
# utility function to set pry context
|
|
30
32
|
# to an instance of <Octokit::Client>
|
|
31
|
-
def client
|
|
33
|
+
def client
|
|
34
|
+
pry(Git::Hub.send(:client))
|
|
35
|
+
end
|
|
32
36
|
|
|
33
37
|
# utility function to set pry context
|
|
34
38
|
# to the Array of github repositories
|
|
35
|
-
def repos
|
|
39
|
+
def repos
|
|
40
|
+
pry(Git::Multi.repositories)
|
|
41
|
+
end
|
|
36
42
|
|
|
37
43
|
# utility function to set pry context
|
|
38
44
|
# to the various 'git multi' commands:
|
|
39
|
-
def cmds
|
|
45
|
+
def cmds
|
|
46
|
+
pry(Git::Multi::Commands)
|
|
47
|
+
end
|
|
40
48
|
|
|
41
49
|
# utility function to set context
|
|
42
50
|
# to the named github repository:
|
data/.rubocop.yml
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
-
TargetRubyVersion: 2.
|
|
2
|
+
TargetRubyVersion: 2.6
|
|
3
|
+
NewCops: enable
|
|
3
4
|
Exclude:
|
|
4
5
|
- 'doc/*'
|
|
5
6
|
- 'tmp/*'
|
|
6
7
|
- 'pkg/*'
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
require:
|
|
10
|
+
- rubocop-minitest
|
|
11
|
+
- rubocop-rake
|
|
12
|
+
|
|
12
13
|
Layout/LineLength:
|
|
13
14
|
Enabled: false
|
|
14
15
|
|
|
@@ -22,6 +23,9 @@ Metrics/MethodLength:
|
|
|
22
23
|
Metrics/ModuleLength:
|
|
23
24
|
Enabled: false
|
|
24
25
|
|
|
26
|
+
Rake/Desc:
|
|
27
|
+
Enabled: false
|
|
28
|
+
|
|
25
29
|
Style/BlockDelimiters:
|
|
26
30
|
Enabled: false
|
|
27
31
|
Style/Documentation:
|
|
@@ -34,11 +38,14 @@ Style/NestedTernaryOperator:
|
|
|
34
38
|
Enabled: false
|
|
35
39
|
Style/RedundantBegin:
|
|
36
40
|
Enabled: false
|
|
37
|
-
|
|
38
|
-
Enabled: false
|
|
41
|
+
|
|
39
42
|
Style/TrailingCommaInArguments:
|
|
40
43
|
Enabled: false
|
|
41
44
|
Style/TrailingCommaInArrayLiteral:
|
|
42
45
|
Enabled: false
|
|
43
46
|
Style/TrailingCommaInHashLiteral:
|
|
44
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.
|
|
1
|
+
2.6.9
|
data/Gemfile.lock
CHANGED
|
@@ -1,51 +1,82 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
git-multi (
|
|
5
|
-
faraday (
|
|
4
|
+
git-multi (6.0.0)
|
|
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.
|
|
14
|
-
coderay (1.1.
|
|
15
|
-
faraday (1.
|
|
13
|
+
ast (2.4.2)
|
|
14
|
+
coderay (1.1.3)
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
minitest (5.14.0)
|
|
39
|
+
method_source (1.0.0)
|
|
40
|
+
minitest (5.15.0)
|
|
21
41
|
multipart-post (2.1.1)
|
|
22
|
-
octokit (4.
|
|
42
|
+
octokit (4.22.0)
|
|
23
43
|
faraday (>= 0.9)
|
|
24
44
|
sawyer (~> 0.8.0, >= 0.5.3)
|
|
25
|
-
parallel (1.
|
|
26
|
-
parser (
|
|
27
|
-
ast (~> 2.4.
|
|
28
|
-
pry (0.
|
|
29
|
-
coderay (~> 1.1
|
|
30
|
-
method_source (~>
|
|
31
|
-
pry-rescue (1.5.
|
|
45
|
+
parallel (1.21.0)
|
|
46
|
+
parser (3.1.0.0)
|
|
47
|
+
ast (~> 2.4.1)
|
|
48
|
+
pry (0.14.1)
|
|
49
|
+
coderay (~> 1.1)
|
|
50
|
+
method_source (~> 1.0)
|
|
51
|
+
pry-rescue (1.5.2)
|
|
32
52
|
interception (>= 0.5)
|
|
33
53
|
pry (>= 0.12.0)
|
|
34
|
-
public_suffix (4.0.
|
|
35
|
-
rainbow (3.
|
|
36
|
-
rake (13.0.
|
|
37
|
-
|
|
38
|
-
|
|
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)
|
|
63
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
64
|
+
rexml
|
|
65
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
|
42
66
|
ruby-progressbar (~> 1.7)
|
|
43
|
-
unicode-display_width (>= 1.4.0, <
|
|
44
|
-
|
|
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)
|
|
45
76
|
sawyer (0.8.2)
|
|
46
77
|
addressable (>= 2.3.5)
|
|
47
78
|
faraday (> 0.8, < 2.0)
|
|
48
|
-
unicode-display_width (1.
|
|
79
|
+
unicode-display_width (2.1.0)
|
|
49
80
|
|
|
50
81
|
PLATFORMS
|
|
51
82
|
ruby
|
|
@@ -58,6 +89,8 @@ DEPENDENCIES
|
|
|
58
89
|
pry-rescue
|
|
59
90
|
rake
|
|
60
91
|
rubocop
|
|
92
|
+
rubocop-minitest
|
|
93
|
+
rubocop-rake
|
|
61
94
|
|
|
62
95
|
BUNDLED WITH
|
|
63
|
-
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
|
@@ -4,51 +4,58 @@ lib = File.expand_path('../lib', __dir__)
|
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'git/multi'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
multi_repo = command = nil
|
|
8
|
+
|
|
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
|
+
elsif (command = ARGV.shift)&.start_with?('++')
|
|
15
|
+
multi_repo = command.delete('++')
|
|
16
|
+
command = nil
|
|
16
17
|
end
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
19
|
+
begin
|
|
20
|
+
case (command ||= ARGV.shift)
|
|
21
|
+
when /\A--/
|
|
22
|
+
case command
|
|
23
|
+
when '--version' then Git::Multi::Commands.version
|
|
24
|
+
when '--help' then Git::Multi::Commands.help
|
|
25
|
+
when '--html' then Git::Multi::Commands.html
|
|
26
|
+
when '--report' then Git::Multi::Commands.report(multi_repo)
|
|
27
|
+
when '--count' then Git::Multi::Commands.count
|
|
28
|
+
when '--refresh' then Git::Multi::Commands.refresh
|
|
29
|
+
when '--json' then Git::Multi::Commands.json(multi_repo)
|
|
30
|
+
when '--list' then Git::Multi::Commands.list(multi_repo)
|
|
31
|
+
when '--archived'then Git::Multi::Commands.archived(multi_repo)
|
|
32
|
+
when '--forked' then Git::Multi::Commands.forked(multi_repo)
|
|
33
|
+
when '--private' then Git::Multi::Commands.private(multi_repo)
|
|
34
|
+
when '--paths' then Git::Multi::Commands.paths(multi_repo)
|
|
35
|
+
when '--missing' then Git::Multi::Commands.missing(multi_repo)
|
|
36
|
+
when '--clone' then Git::Multi::Commands.clone(multi_repo)
|
|
37
|
+
when '--stale' then Git::Multi::Commands.stale(multi_repo)
|
|
38
|
+
when '--excess' then Git::Multi::Commands.excess(multi_repo)
|
|
39
|
+
when '--spurious'then Git::Multi::Commands.spurious(multi_repo)
|
|
40
|
+
when '--query' then Git::Multi::Commands.query(ARGV, multi_repo)
|
|
41
|
+
when '--find' then Git::Multi::Commands.find(ARGV, multi_repo)
|
|
42
|
+
when '--eval' then Git::Multi::Commands.eval(ARGV, multi_repo)
|
|
43
|
+
when '--raw' then Git::Multi::Commands.raw(ARGV, multi_repo)
|
|
44
|
+
when '--shell' then Git::Multi::Commands.shell(ARGV, multi_repo)
|
|
45
|
+
else
|
|
46
|
+
abort \
|
|
47
|
+
"Unknown 'git multi' command: #{command}\n\n" \
|
|
48
|
+
'(use --help/-h to list all available commands)'
|
|
49
|
+
end
|
|
50
|
+
when nil, '', '-h'
|
|
51
|
+
Git::Multi::Commands.help
|
|
43
52
|
else
|
|
44
|
-
|
|
45
|
-
"Unknown 'git multi' command: #{command}\n\n" \
|
|
46
|
-
'(use --help/-h to list all available commands)'
|
|
53
|
+
Git::Multi::Commands.exec(command, ARGV, multi_repo)
|
|
47
54
|
end
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
rescue ArgumentError
|
|
56
|
+
abort \
|
|
57
|
+
"Unknown multi-repo: #{$ERROR_INFO.message}\n\n" \
|
|
58
|
+
'(use `git multi --report` to list all known multi-repos)'
|
|
52
59
|
end
|
|
53
60
|
|
|
54
61
|
# That's all Folks!
|
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)/}) }
|
|
@@ -25,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
25
35
|
|
|
26
36
|
spec.post_install_message = Git::Multi::PIM
|
|
27
37
|
|
|
28
|
-
spec.add_dependency 'faraday', '
|
|
38
|
+
spec.add_dependency 'faraday', '~> 1'
|
|
29
39
|
spec.add_dependency 'octokit', '~> 4'
|
|
30
40
|
|
|
31
41
|
spec.add_development_dependency 'bundler'
|
|
@@ -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/dir.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class Dir
|
|
2
2
|
def git_repos(subdir = '*')
|
|
3
3
|
Dir.glob(File.join(path, subdir, '*', '.git')).map { |path_to_git_dir|
|
|
4
|
-
path_to_git_repo = File.dirname(path_to_git_dir)
|
|
5
|
-
repo_name = path_to_git_repo[%r{[
|
|
6
|
-
def repo_name.full_name() self; end
|
|
4
|
+
path_to_git_repo = File.dirname(path_to_git_dir) # without "/.git"
|
|
5
|
+
repo_name = path_to_git_repo[%r{[^/]+/[^/]+\z}] # e.g. "pvdb/git-multi"
|
|
6
|
+
def repo_name.full_name() self; end # rubocop:disable Style/SingleLineMethods
|
|
7
7
|
repo_name
|
|
8
8
|
}
|
|
9
9
|
end
|
data/lib/ext/string.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
# rubocop:disable Layout/EmptyLineBetweenDefs
|
|
2
|
-
|
|
3
1
|
class String
|
|
4
|
-
|
|
2
|
+
# rubocop:disable Style/SingleLineMethods
|
|
5
3
|
def colorize(color_code) "\e[#{color_code}m#{self}\e[0m"; end
|
|
6
4
|
|
|
7
5
|
def bold() colorize('1'); end
|
|
@@ -12,7 +10,5 @@ class String
|
|
|
12
10
|
def green() colorize('32'); end
|
|
13
11
|
|
|
14
12
|
def undent() gsub(/^.{#{slice(/^ +/).length}}/, ''); end
|
|
15
|
-
|
|
13
|
+
# rubocop:enable Style/SingleLineMethods
|
|
16
14
|
end
|
|
17
|
-
|
|
18
|
-
# rubocop:enable Layout/EmptyLineBetweenDefs
|
data/lib/git/hub.rb
CHANGED
|
@@ -2,10 +2,10 @@ require 'octokit'
|
|
|
2
2
|
|
|
3
3
|
begin
|
|
4
4
|
require 'net/http/persistent'
|
|
5
|
-
Octokit.middleware.
|
|
6
|
-
Faraday::Adapter::
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
if Octokit.middleware.adapter == Faraday::Adapter::NetHttp
|
|
6
|
+
adapter = Faraday::RackBuilder::Handler.new(Faraday::Adapter::NetHttpPersistent)
|
|
7
|
+
Octokit.middleware.instance_variable_set(:@adapter, adapter)
|
|
8
|
+
end
|
|
9
9
|
rescue LoadError
|
|
10
10
|
# NOOP - `Net::HTTP::Persistent` is optional, so
|
|
11
11
|
# if the gem isn't installed, then we run with the
|
|
@@ -16,7 +16,6 @@ end
|
|
|
16
16
|
|
|
17
17
|
module Git
|
|
18
18
|
module Hub
|
|
19
|
-
|
|
20
19
|
module_function
|
|
21
20
|
|
|
22
21
|
def client
|
|
@@ -30,31 +29,31 @@ module Git
|
|
|
30
29
|
|
|
31
30
|
def connected?
|
|
32
31
|
@connected ||= begin
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
client.validate_credentials
|
|
33
|
+
true
|
|
34
|
+
rescue Faraday::ConnectionFailed
|
|
35
|
+
false
|
|
36
|
+
end
|
|
38
37
|
end
|
|
39
38
|
|
|
40
39
|
# FIXME: update login as part of `--refresh`
|
|
41
40
|
|
|
42
41
|
def login
|
|
43
42
|
@login ||= begin
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
client.user.login
|
|
44
|
+
rescue Octokit::Unauthorized, Faraday::ConnectionFailed
|
|
45
|
+
nil
|
|
46
|
+
end
|
|
48
47
|
end
|
|
49
48
|
|
|
50
49
|
# FIXME: update orgs as part of `--refresh`
|
|
51
50
|
|
|
52
51
|
def orgs
|
|
53
52
|
@orgs ||= begin
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
client.organizations.map(&:login)
|
|
54
|
+
rescue Octokit::Unauthorized, Faraday::ConnectionFailed
|
|
55
|
+
[]
|
|
56
|
+
end
|
|
58
57
|
end
|
|
59
58
|
|
|
60
59
|
# pick a (semi-)random repo from GitHub
|
|
@@ -77,10 +76,10 @@ module Git
|
|
|
77
76
|
|
|
78
77
|
@user_repositories = Hash.new { |repos, (user, type)|
|
|
79
78
|
repos[[user, type]] = begin
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
client
|
|
80
|
+
.repositories(user, type: type)
|
|
81
|
+
.sort_by { |repo| repo[:name].downcase }
|
|
82
|
+
end
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
def user_repositories(user, type = :owner)
|
|
@@ -94,16 +93,15 @@ module Git
|
|
|
94
93
|
|
|
95
94
|
@org_repositories = Hash.new { |repos, (org, type)|
|
|
96
95
|
repos[[org, type]] = begin
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
client
|
|
97
|
+
.org_repositories(org, type: type)
|
|
98
|
+
.sort_by { |repo| repo[:name].downcase }
|
|
99
|
+
end
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
def org_repositories(org, type = :owner)
|
|
104
103
|
# type can be one of: all, public, private, forks, sources, member
|
|
105
104
|
@org_repositories[[org, type]]
|
|
106
105
|
end
|
|
107
|
-
|
|
108
106
|
end
|
|
109
107
|
end
|
data/lib/git/multi/commands.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module Git
|
|
2
2
|
module Multi
|
|
3
3
|
module Commands
|
|
4
|
-
|
|
5
4
|
module_function
|
|
6
5
|
|
|
7
6
|
def version
|
|
@@ -33,7 +32,7 @@ module Git
|
|
|
33
32
|
when *MULTI_REPOS
|
|
34
33
|
Report.for(multi_repo)
|
|
35
34
|
else
|
|
36
|
-
raise
|
|
35
|
+
raise ArgumentError, multi_repo
|
|
37
36
|
end
|
|
38
37
|
end
|
|
39
38
|
|
|
@@ -134,7 +133,7 @@ module Git
|
|
|
134
133
|
begin
|
|
135
134
|
if repository.instance_eval(commands.join(' && '))
|
|
136
135
|
repository.just_do_it(
|
|
137
|
-
->(_repo) { nil
|
|
136
|
+
->(_repo) {}, # empty lambda: nil
|
|
138
137
|
->(repo) { puts repo.full_name },
|
|
139
138
|
)
|
|
140
139
|
end
|
|
@@ -203,7 +202,6 @@ module Git
|
|
|
203
202
|
end
|
|
204
203
|
|
|
205
204
|
private_class_method :system
|
|
206
|
-
|
|
207
205
|
end
|
|
208
206
|
end
|
|
209
207
|
end
|
data/lib/git/multi/config.rb
CHANGED
data/lib/git/multi/report.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module Git
|
|
2
2
|
module Multi
|
|
3
3
|
module Report
|
|
4
|
-
|
|
5
4
|
TICK = ['2714'.hex].pack('U*').green.freeze
|
|
6
5
|
CROSS = ['2718'.hex].pack('U*').red.freeze
|
|
7
6
|
ARROW = ['2794'.hex].pack('U*').blue.freeze
|
|
@@ -34,7 +33,7 @@ module Git
|
|
|
34
33
|
setting_status(["\tGitHub ", "#{github_count} repositories"])
|
|
35
34
|
setting_status(["\tcloned ", cloned_count, "(#{missing_count} missing)"])
|
|
36
35
|
Git::Multi.missing_repositories_for(owner).each do |missing|
|
|
37
|
-
setting_status(["\tmissing", missing.full_name], false, false)
|
|
36
|
+
setting_status(["\tmissing", missing.full_name], valid: false, optional: false)
|
|
38
37
|
end
|
|
39
38
|
setting_status(["\tsubdirs", subdir_count, "(#{surplus_count} surplus)"])
|
|
40
39
|
end
|
|
@@ -43,14 +42,14 @@ module Git
|
|
|
43
42
|
github_count = Git::Multi.repositories_for(superproject).count
|
|
44
43
|
|
|
45
44
|
if github_count.zero?
|
|
46
|
-
setting_status([message, 'listed but not configured'], false, false)
|
|
45
|
+
setting_status([message, 'listed but not configured'], valid: false, optional: false)
|
|
47
46
|
else
|
|
48
47
|
setting_status([message], true)
|
|
49
48
|
Git::Multi.repositories_for(superproject).each do |repo|
|
|
50
49
|
if File.directory? repo.local_path
|
|
51
|
-
setting_status(["\tcloned ", repo.full_name], true)
|
|
50
|
+
setting_status(["\tcloned ", repo.full_name], valid: true)
|
|
52
51
|
else
|
|
53
|
-
setting_status(["\tmissing", repo.full_name], false, false)
|
|
52
|
+
setting_status(["\tmissing", repo.full_name], valid: false, optional: false)
|
|
54
53
|
end
|
|
55
54
|
end
|
|
56
55
|
end
|
|
@@ -66,7 +65,7 @@ module Git
|
|
|
66
65
|
when *SUPERPROJECTS
|
|
67
66
|
project_status("superproject \"#{project}\"", project)
|
|
68
67
|
else
|
|
69
|
-
raise
|
|
68
|
+
raise ArgumentError, multi_repo
|
|
70
69
|
end
|
|
71
70
|
end
|
|
72
71
|
end
|
|
@@ -77,7 +76,7 @@ module Git
|
|
|
77
76
|
elsif token.empty?
|
|
78
77
|
'(empty)'
|
|
79
78
|
else
|
|
80
|
-
"#{'*' * 36}#{token[36
|
|
79
|
+
"#{'*' * 36}#{token[36..]}"
|
|
81
80
|
end
|
|
82
81
|
end
|
|
83
82
|
|
|
@@ -103,7 +102,7 @@ module Git
|
|
|
103
102
|
end
|
|
104
103
|
end
|
|
105
104
|
|
|
106
|
-
private_class_method def setting_status(messages, valid
|
|
105
|
+
private_class_method def setting_status(messages, valid: false, optional: true)
|
|
107
106
|
fields = messages.compact.join(' - ')
|
|
108
107
|
icon = valid ? TICK : optional ? ARROW : CROSS
|
|
109
108
|
puts "#{icon} #{fields}"
|
|
@@ -116,19 +115,18 @@ module Git
|
|
|
116
115
|
abbreviate(file),
|
|
117
116
|
File.file?(file) ? "#{File.size(file).commify} bytes" : nil,
|
|
118
117
|
],
|
|
119
|
-
file && !file.empty? && File.file?(file),
|
|
120
|
-
false
|
|
118
|
+
valid: file && !file.empty? && File.file?(file),
|
|
119
|
+
optional: false,
|
|
121
120
|
)
|
|
122
121
|
end
|
|
123
122
|
|
|
124
123
|
private_class_method def directory_status(messages, directory)
|
|
125
124
|
setting_status(
|
|
126
125
|
messages,
|
|
127
|
-
directory && !directory.empty? && File.directory?(directory),
|
|
128
|
-
false
|
|
126
|
+
valid: directory && !directory.empty? && File.directory?(directory),
|
|
127
|
+
optional: false,
|
|
129
128
|
)
|
|
130
129
|
end
|
|
131
|
-
|
|
132
130
|
end
|
|
133
131
|
end
|
|
134
132
|
end
|
data/lib/git/multi/version.rb
CHANGED
data/lib/git/multi.rb
CHANGED
|
@@ -139,7 +139,6 @@ module Git
|
|
|
139
139
|
#
|
|
140
140
|
|
|
141
141
|
module Nike
|
|
142
|
-
|
|
143
142
|
# rubocop:disable Metrics/PerceivedComplexity
|
|
144
143
|
# rubocop:disable Metrics/CyclomaticComplexity
|
|
145
144
|
def just_do_it(interactive, pipelined, captured = nil, options = {})
|
|
@@ -149,15 +148,15 @@ module Git
|
|
|
149
148
|
else Dir.pwd
|
|
150
149
|
end
|
|
151
150
|
Dir.chdir(working_dir) do
|
|
152
|
-
if
|
|
153
|
-
|
|
151
|
+
if $stdout.tty? && $stderr.tty?
|
|
152
|
+
$stdout.puts "#{full_name.invert} (#{fractional_index})"
|
|
154
153
|
interactive.call(self)
|
|
155
|
-
elsif
|
|
154
|
+
elsif $stderr.tty? && captured
|
|
156
155
|
errors = File.join(ENV['TMPDIR'], "git-multi.#{$PID}")
|
|
157
156
|
captured.call(self, errors)
|
|
158
157
|
if File.exist?(errors) && !File.zero?(errors)
|
|
159
158
|
# rubocop:disable Style/StderrPuts
|
|
160
|
-
|
|
159
|
+
$stderr.puts "#{full_name.invert} (#{fractional_index})"
|
|
161
160
|
Kernel.system "cat #{errors} > /dev/tty ;"
|
|
162
161
|
# rubocop:enable Style/StderrPuts
|
|
163
162
|
end
|
|
@@ -182,7 +181,6 @@ module Git
|
|
|
182
181
|
end
|
|
183
182
|
end
|
|
184
183
|
end
|
|
185
|
-
|
|
186
184
|
end
|
|
187
185
|
|
|
188
186
|
def repositories
|
|
@@ -197,7 +195,7 @@ module Git
|
|
|
197
195
|
repo.local_path = Pathname.new(File.join(WORKAREA, repo.full_name))
|
|
198
196
|
repo.fractional_index = "#{index + 1}/#{repos.count}"
|
|
199
197
|
# fix 'repo' => https://github.com/octokit/octokit.rb/issues/727
|
|
200
|
-
repo.compliant_ssh_url =
|
|
198
|
+
repo.compliant_ssh_url = "ssh://#{repo.ssh_url.split(':', 2).join('/')}"
|
|
201
199
|
# remove optional '.git' suffix from 'git@github.com:pvdb/git-multi.git'
|
|
202
200
|
repo.abbreviated_ssh_url = repo.ssh_url.chomp('.git')
|
|
203
201
|
# extend 'repo' with 'just do it' capabilities
|
|
@@ -216,20 +214,21 @@ module Git
|
|
|
216
214
|
#
|
|
217
215
|
|
|
218
216
|
def repositories_for(multi_repo = nil)
|
|
219
|
-
case (owner = superproject = multi_repo)
|
|
217
|
+
case (owner = superproject = full_names = multi_repo)
|
|
220
218
|
when nil
|
|
221
219
|
repositories # all of them
|
|
220
|
+
when Array
|
|
221
|
+
repositories.find_all { |repository|
|
|
222
|
+
full_names.include?(repository.full_name)
|
|
223
|
+
}
|
|
222
224
|
when *USERS, *ORGANIZATIONS
|
|
223
225
|
repositories.find_all { |repository|
|
|
224
226
|
repository.owner.login == owner
|
|
225
227
|
}
|
|
226
228
|
when *SUPERPROJECTS
|
|
227
|
-
|
|
228
|
-
repositories.find_all { |repository|
|
|
229
|
-
full_names.include?(repository.full_name)
|
|
230
|
-
}
|
|
229
|
+
repositories_for(full_names_for(superproject))
|
|
231
230
|
else
|
|
232
|
-
raise
|
|
231
|
+
raise ArgumentError, multi_repo
|
|
233
232
|
end
|
|
234
233
|
end
|
|
235
234
|
|
|
@@ -292,6 +291,5 @@ module Git
|
|
|
292
291
|
File.directory? repo.local_path
|
|
293
292
|
}
|
|
294
293
|
end
|
|
295
|
-
|
|
296
294
|
end
|
|
297
295
|
end
|
data/man/git-multi.1
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'\" t
|
|
2
2
|
.\" Title: git-multi
|
|
3
|
-
.\" Author: [FIXME: author] [see http://docbook.
|
|
4
|
-
.\" Generator: DocBook XSL Stylesheets
|
|
5
|
-
.\" Date:
|
|
3
|
+
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
|
|
4
|
+
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
|
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:
|
|
@@ -48,7 +48,7 @@ To execute the same git command in multiple repositories, the invocation is as f
|
|
|
48
48
|
.fi
|
|
49
49
|
.sp
|
|
50
50
|
.sp
|
|
51
|
-
Both ways of running \fBgit multi\fR take an optional, so\-called "multi
|
|
51
|
+
Both ways of running \fBgit multi\fR take an optional, so\-called "multi\-repo" argument to limit the operation to the list of repositories in the referenced "multi\-repo", ie\&. a single GitHub user or a single GitHub organization:
|
|
52
52
|
.sp
|
|
53
53
|
.nf
|
|
54
54
|
\fIgit multi\fR ++<multi_repo> \-\-<option> [<option_arguments>]
|
|
@@ -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
|
|
@@ -559,7 +588,7 @@ local, binary cache of GitHub repository metadata
|
|
|
559
588
|
.PP
|
|
560
589
|
\fB${HOME}/\&.git/multi/superprojects\&.config\fR
|
|
561
590
|
.RS 4
|
|
562
|
-
definitions for so\-called "superproject" multi
|
|
591
|
+
definitions for so\-called "superproject" multi\-repos
|
|
563
592
|
.RE
|
|
564
593
|
.SH "REFERENCES"
|
|
565
594
|
.sp
|
data/man/git-multi.erb
CHANGED
|
@@ -26,9 +26,9 @@ invocation is as follows:
|
|
|
26
26
|
[verse]
|
|
27
27
|
'git multi' <git_command> [<git_command_arguments>]
|
|
28
28
|
|
|
29
|
-
Both ways of running `git multi` take an optional, so-called "multi
|
|
29
|
+
Both ways of running `git multi` take an optional, so-called "multi-repo"
|
|
30
30
|
argument to limit the operation to the list of repositories in the referenced
|
|
31
|
-
"multi
|
|
31
|
+
"multi-repo", ie. a single GitHub user or a single GitHub organization:
|
|
32
32
|
|
|
33
33
|
[verse]
|
|
34
34
|
'git multi' ++<multi_repo> --<option> [<option_arguments>]
|
|
@@ -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
|
|
|
@@ -256,7 +269,7 @@ FILES
|
|
|
256
269
|
local, binary cache of GitHub repository metadata
|
|
257
270
|
|
|
258
271
|
`${HOME}/.git/multi/superprojects.config`::
|
|
259
|
-
definitions for so-called "superproject" multi
|
|
272
|
+
definitions for so-called "superproject" multi-repos
|
|
260
273
|
|
|
261
274
|
REFERENCES
|
|
262
275
|
----------
|
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 */
|
|
@@ -436,7 +436,7 @@ thead, p.table.header {
|
|
|
436
436
|
p.table {
|
|
437
437
|
margin-top: 0;
|
|
438
438
|
}
|
|
439
|
-
/* Because the table frame attribute is
|
|
439
|
+
/* Because the table frame attribute is overridden by CSS in most browsers. */
|
|
440
440
|
div.tableblock > table[frame="void"] {
|
|
441
441
|
border-style: none;
|
|
442
442
|
}
|
|
@@ -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">
|
|
@@ -766,9 +766,9 @@ invocation is as follows:</p></div>
|
|
|
766
766
|
<pre class="content"><em>git multi</em> <git_command> [<git_command_arguments>]</pre>
|
|
767
767
|
<div class="attribution">
|
|
768
768
|
</div></div>
|
|
769
|
-
<div class="paragraph"><p>Both ways of running <code>git multi</code> take an optional, so-called "multi
|
|
769
|
+
<div class="paragraph"><p>Both ways of running <code>git multi</code> take an optional, so-called "multi-repo"
|
|
770
770
|
argument to limit the operation to the list of repositories in the referenced
|
|
771
|
-
"multi
|
|
771
|
+
"multi-repo", ie. a single GitHub user or a single GitHub organization:</p></div>
|
|
772
772
|
<div class="verseblock">
|
|
773
773
|
<pre class="content"><em>git multi</em> ++<multi_repo> --<option> [<option_arguments>]</pre>
|
|
774
774
|
<div class="attribution">
|
|
@@ -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>
|
|
@@ -1186,7 +1205,7 @@ git multi --json | jq -r '.[] | select(.fork == true) | .full_name'</code></pre>
|
|
|
1186
1205
|
</dt>
|
|
1187
1206
|
<dd>
|
|
1188
1207
|
<p>
|
|
1189
|
-
definitions for so-called "superproject" multi
|
|
1208
|
+
definitions for so-called "superproject" multi-repos
|
|
1190
1209
|
</p>
|
|
1191
1210
|
</dd>
|
|
1192
1211
|
</dl></div>
|
|
@@ -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,29 +1,29 @@
|
|
|
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
|
-
autorequire:
|
|
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
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '1'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '1'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: octokit
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -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,16 +213,18 @@ 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
|
-
|
|
192
|
-
|
|
193
|
-
signing_key:
|
|
226
|
+
rubygems_version: 3.0.3.1
|
|
227
|
+
signing_key:
|
|
194
228
|
specification_version: 4
|
|
195
229
|
summary: The ultimate multi-repo utility for git!
|
|
196
230
|
test_files: []
|