git-multi 6.0.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9c0aa5b5dc19107281de9fe6c8dae2d956f77954b7f645f70102d2d693a69bd
4
- data.tar.gz: b5033965b46ce4c2d4a7d781d3e1efa55a6b3f87f63563fde4e913461bcac1f1
3
+ metadata.gz: 6fc5756a97dd43c7ca903ed1060715223b162d5413258bafd1961236f78e1cba
4
+ data.tar.gz: 5a86de46ae41373db370b8d8cfe3a030f5dbc402f93f9bd866cbed861a2ceab7
5
5
  SHA512:
6
- metadata.gz: f76f76d736d13581e3a280118a4ec112cfeb8239a0ebb91d708ad22704b384d5ee0b85e1cd231af76e536ce0903953eaafc7d04e45073606d32b0f3d2ac6dd3a
7
- data.tar.gz: 8b1fb3fe50001711983dbc9e998af763a6d5c8c57cdea814bb7bc2d5e7a1828e5291d0f0630f3cd69b30140334091fd318708fe2099bb50639f32d79c2303bbd
6
+ metadata.gz: 775ba9085768be324c346075e72d57dcab01bdbc4292a56906c44fcfff4798cdcd078bf75032b1847bde27e9a2f624d7dbb275434ba0c3880a5ab3bede5662bd
7
+ data.tar.gz: 13e1998772853d33aae8b4adaa2d0a277dc40e002d0a07bfc890952136edc110eb079718c9faa67db57ac7cd4e92596e5e1bd25a0d137cfe498534c36b586efb
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.9
1
+ 2.6.10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-multi (6.0.0)
4
+ git-multi (8.0.1)
5
5
  faraday (~> 1)
6
6
  octokit (~> 4)
7
7
 
@@ -12,7 +12,7 @@ GEM
12
12
  public_suffix (>= 2.0.2, < 5.0)
13
13
  ast (2.4.2)
14
14
  coderay (1.1.3)
15
- faraday (1.9.3)
15
+ faraday (1.10.0)
16
16
  faraday-em_http (~> 1.0)
17
17
  faraday-em_synchrony (~> 1.0)
18
18
  faraday-excon (~> 1.1)
@@ -28,22 +28,23 @@ GEM
28
28
  faraday-em_synchrony (1.0.0)
29
29
  faraday-excon (1.1.0)
30
30
  faraday-httpclient (1.0.1)
31
- faraday-multipart (1.0.3)
32
- multipart-post (>= 1.2, < 3)
31
+ faraday-multipart (1.0.4)
32
+ multipart-post (~> 2)
33
33
  faraday-net_http (1.0.1)
34
34
  faraday-net_http_persistent (1.2.0)
35
35
  faraday-patron (1.0.0)
36
36
  faraday-rack (1.0.0)
37
37
  faraday-retry (1.0.3)
38
38
  interception (0.5)
39
+ json (2.6.2)
39
40
  method_source (1.0.0)
40
- minitest (5.15.0)
41
- multipart-post (2.1.1)
42
- octokit (4.22.0)
43
- faraday (>= 0.9)
44
- sawyer (~> 0.8.0, >= 0.5.3)
45
- parallel (1.21.0)
46
- parser (3.1.0.0)
41
+ minitest (5.16.2)
42
+ multipart-post (2.2.3)
43
+ octokit (4.25.1)
44
+ faraday (>= 1, < 3)
45
+ sawyer (~> 0.9)
46
+ parallel (1.22.1)
47
+ parser (3.1.2.0)
47
48
  ast (~> 2.4.1)
48
49
  pry (0.14.1)
49
50
  coderay (~> 1.1)
@@ -51,32 +52,33 @@ GEM
51
52
  pry-rescue (1.5.2)
52
53
  interception (>= 0.5)
53
54
  pry (>= 0.12.0)
54
- public_suffix (4.0.6)
55
+ public_suffix (4.0.7)
55
56
  rainbow (3.1.1)
56
57
  rake (13.0.6)
57
- regexp_parser (2.2.0)
58
+ regexp_parser (2.5.0)
58
59
  rexml (3.2.5)
59
- rubocop (1.25.0)
60
+ rubocop (1.32.0)
61
+ json (~> 2.3)
60
62
  parallel (~> 1.10)
61
63
  parser (>= 3.1.0.0)
62
64
  rainbow (>= 2.2.2, < 4.0)
63
65
  regexp_parser (>= 1.8, < 3.0)
64
- rexml
65
- rubocop-ast (>= 1.15.1, < 2.0)
66
+ rexml (>= 3.2.5, < 4.0)
67
+ rubocop-ast (>= 1.19.1, < 2.0)
66
68
  ruby-progressbar (~> 1.7)
67
69
  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)
70
+ rubocop-ast (1.19.1)
71
+ parser (>= 3.1.1.0)
72
+ rubocop-minitest (0.20.1)
71
73
  rubocop (>= 0.90, < 2.0)
72
74
  rubocop-rake (0.6.0)
73
75
  rubocop (~> 1.0)
74
76
  ruby-progressbar (1.11.0)
75
77
  ruby2_keywords (0.0.5)
76
- sawyer (0.8.2)
78
+ sawyer (0.9.2)
77
79
  addressable (>= 2.3.5)
78
- faraday (> 0.8, < 2.0)
79
- unicode-display_width (2.1.0)
80
+ faraday (>= 0.17.3, < 3)
81
+ unicode-display_width (2.2.0)
80
82
 
81
83
  PLATFORMS
82
84
  ruby
@@ -93,4 +95,4 @@ DEPENDENCIES
93
95
  rubocop-rake
94
96
 
95
97
  BUNDLED WITH
96
- 2.3.6
98
+ 2.3.19
data/git-multi.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/pvdb/git-multi'
15
15
  spec.license = 'MIT'
16
16
 
17
- spec.required_ruby_version = ['>= 2.6.0', '< 2.7.0']
17
+ spec.required_ruby_version = ['>= 2.6.0', '< 3.0.0']
18
18
 
19
19
  spec.metadata['homepage_uri'] = spec.homepage
20
20
  spec.metadata['source_code_uri'] = spec.homepage
@@ -7,8 +7,8 @@ module Git
7
7
  value.empty? && default ? default : value
8
8
  end
9
9
 
10
- def full_names_for(superproject)
11
- list = `git config --get-all superproject.#{superproject}.repo`
10
+ def global_options(name)
11
+ list = `git config --global --get-all #{name}`
12
12
  list.split($RS).map(&:strip).map(&:freeze)
13
13
  end
14
14
 
@@ -22,8 +22,7 @@ module Git
22
22
  end
23
23
 
24
24
  def env_var(name, default = nil)
25
- value = ENV[name]
26
- (value.nil? || value.empty?) && default ? default : value
25
+ ENV.fetch(name, default)
27
26
  end
28
27
  end
29
28
  end
@@ -16,6 +16,13 @@ module Git
16
16
 
17
17
  \tgit config --global --add \033[1mgit.multi.workarea\033[0m <your_root_workarea>
18
18
 
19
+ You can specify a list of user or organization repositories to ignore:
20
+
21
+ \tgit config --global --add \033[1mgit.multi.exclude\033[0m <org_name>/<repo_name>
22
+ \tgit config --global --add \033[1mgit.multi.exclude\033[0m <user_name>/<repo_name>
23
+
24
+ (can be used multiple times to exclude multiple user or organization repositories)
25
+
19
26
  Thanks for using \033[1mgit multi\033[0m ... the ultimate multi-repo utility for git!
20
27
 
21
28
  PIM
@@ -35,6 +35,9 @@ module Git
35
35
  Git::Multi.missing_repositories_for(owner).each do |missing|
36
36
  setting_status(["\tmissing", missing.full_name], valid: false, optional: false)
37
37
  end
38
+ Git::Multi.excluded_repositories_for(owner).each do |excluded|
39
+ setting_status(["\texcluded", excluded.full_name], valid: false, optional: false)
40
+ end
38
41
  setting_status(["\tsubdirs", subdir_count, "(#{surplus_count} surplus)"])
39
42
  end
40
43
 
@@ -44,7 +47,7 @@ module Git
44
47
  if github_count.zero?
45
48
  setting_status([message, 'listed but not configured'], valid: false, optional: false)
46
49
  else
47
- setting_status([message], true)
50
+ setting_status([message], valid: true)
48
51
  Git::Multi.repositories_for(superproject).each do |repo|
49
52
  if File.directory? repo.local_path
50
53
  setting_status(["\tcloned ", repo.full_name], valid: true)
@@ -1,7 +1,7 @@
1
1
  module Git
2
2
  module Multi
3
3
  NAME = 'git-multi'.freeze
4
- VERSION = '6.0.0'.freeze
4
+ VERSION = '8.0.1'.freeze
5
5
 
6
6
  def self.version
7
7
  "#{NAME} v#{VERSION}"
data/lib/git/multi.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'etc'
2
2
  require 'json'
3
+ require 'tmpdir'
3
4
  require 'pathname'
4
5
  require 'fileutils'
5
6
  require 'shellwords'
@@ -36,9 +37,6 @@ module Git
36
37
  TOKEN = global_option('github.token', DEFAULT_TOKEN)
37
38
 
38
39
  GIT_MULTI_DIR = File.join(HOME, '.git', 'multi')
39
-
40
- FileUtils.mkdir_p(GIT_MULTI_DIR) # ensure `~/.git/multi` directory exists
41
-
42
40
  GITHUB_CACHE = File.join(GIT_MULTI_DIR, 'repositories.byte')
43
41
 
44
42
  USERS = global_list('git.multi.users')
@@ -46,6 +44,7 @@ module Git
46
44
  SUPERPROJECTS = global_list('git.multi.superprojects')
47
45
 
48
46
  MULTI_REPOS = (USERS + ORGANIZATIONS + SUPERPROJECTS)
47
+ EXCLUDED_REPOS = global_options('git.multi.exclude')
49
48
 
50
49
  MAN_PAGE = File.expand_path('../../man/git-multi.1', __dir__)
51
50
  HTML_PAGE = File.expand_path('../../man/git-multi.html', __dir__)
@@ -129,6 +128,9 @@ module Git
129
128
  #
130
129
 
131
130
  def refresh_repositories
131
+ # ensure `~/.git/multi` directory exists
132
+ FileUtils.mkdir_p(GIT_MULTI_DIR)
133
+
132
134
  File.open(GITHUB_CACHE, 'wb') do |file|
133
135
  Marshal.dump(github_repositories, file)
134
136
  end
@@ -152,7 +154,7 @@ module Git
152
154
  $stdout.puts "#{full_name.invert} (#{fractional_index})"
153
155
  interactive.call(self)
154
156
  elsif $stderr.tty? && captured
155
- errors = File.join(ENV['TMPDIR'], "git-multi.#{$PID}")
157
+ errors = File.join(Dir.tmpdir, "git-multi.#{$PID}")
156
158
  captured.call(self, errors)
157
159
  if File.exist?(errors) && !File.zero?(errors)
158
160
  # rubocop:disable Style/StderrPuts
@@ -194,6 +196,8 @@ module Git
194
196
  repo.parent_dir = Pathname.new(File.join(WORKAREA, repo.owner.login))
195
197
  repo.local_path = Pathname.new(File.join(WORKAREA, repo.full_name))
196
198
  repo.fractional_index = "#{index + 1}/#{repos.count}"
199
+ # git multi will "hard ignore" all excluded repos
200
+ repo.excluded = EXCLUDED_REPOS.include?(repo.full_name)
197
201
  # fix 'repo' => https://github.com/octokit/octokit.rb/issues/727
198
202
  repo.compliant_ssh_url = "ssh://#{repo.ssh_url.split(':', 2).join('/')}"
199
203
  # remove optional '.git' suffix from 'git@github.com:pvdb/git-multi.git'
@@ -213,7 +217,11 @@ module Git
213
217
  # lists of repos for a given multi-repo
214
218
  #
215
219
 
216
- def repositories_for(multi_repo = nil)
220
+ def full_names_for(superproject)
221
+ global_options("superproject.#{superproject}.repo")
222
+ end
223
+
224
+ def all_repositories_for(multi_repo = nil)
217
225
  case (owner = superproject = full_names = multi_repo)
218
226
  when nil
219
227
  repositories # all of them
@@ -226,26 +234,34 @@ module Git
226
234
  repository.owner.login == owner
227
235
  }
228
236
  when *SUPERPROJECTS
229
- repositories_for(full_names_for(superproject))
237
+ all_repositories_for(full_names_for(superproject))
230
238
  else
231
239
  raise ArgumentError, multi_repo
232
240
  end
233
241
  end
234
242
 
243
+ def repositories_for(multi_repo = nil)
244
+ all_repositories_for(multi_repo).delete_if(&:excluded)
245
+ end
246
+
235
247
  #
236
248
  # lists of repositories with a given state
237
249
  #
238
250
 
239
251
  def archived_repositories_for(multi_repo = nil)
240
- repositories_for(multi_repo).find_all(&:archived)
252
+ all_repositories_for(multi_repo).find_all(&:archived)
241
253
  end
242
254
 
243
255
  def forked_repositories_for(multi_repo = nil)
244
- repositories_for(multi_repo).find_all(&:fork)
256
+ all_repositories_for(multi_repo).find_all(&:fork)
245
257
  end
246
258
 
247
259
  def private_repositories_for(multi_repo = nil)
248
- repositories_for(multi_repo).find_all(&:private)
260
+ all_repositories_for(multi_repo).find_all(&:private)
261
+ end
262
+
263
+ def excluded_repositories_for(multi_repo = nil)
264
+ all_repositories_for(multi_repo).find_all(&:excluded)
249
265
  end
250
266
 
251
267
  #
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: 02/02/2022
5
+ .\" Date: 08/01/2022
6
6
  .\" Manual: Git Manual
7
- .\" Source: Git 2.35.1.4.g5d01301f2b.dirty
7
+ .\" Source: Git 2.35.1.455.g1a4874565f.dirty
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "GIT\-MULTI" "1" "02/02/2022" "Git 2\&.35\&.1\&.4\&.g5d01301f" "Git Manual"
10
+ .TH "GIT\-MULTI" "1" "08/01/2022" "Git 2\&.35\&.1\&.455\&.g1a4874" "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 \fBv6\&.0\&.0\fR of \fIgit multi\fR \&... hooray!
34
+ This is \fBv8\&.0\&.1\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:
@@ -517,7 +517,7 @@ subscribers_url subscription_url svn_url
517
517
  tags_url teams_url temp_clone_token
518
518
  topics trees_url updated_at
519
519
  url visibility watchers
520
- watchers_count
520
+ watchers_count web_commit_signoff_required
521
521
  .fi
522
522
  .if n \{\
523
523
  .RE
@@ -585,11 +585,6 @@ root directory where repos will been cloned
585
585
  .RS 4
586
586
  local, binary cache of GitHub repository metadata
587
587
  .RE
588
- .PP
589
- \fB${HOME}/\&.git/multi/superprojects\&.config\fR
590
- .RS 4
591
- definitions for so\-called "superproject" multi\-repos
592
- .RE
593
588
  .SH "REFERENCES"
594
589
  .sp
595
590
  .RS 4
data/man/git-multi.erb CHANGED
@@ -268,9 +268,6 @@ FILES
268
268
  `${HOME}/.git/multi/repositories.byte`::
269
269
  local, binary cache of GitHub repository metadata
270
270
 
271
- `${HOME}/.git/multi/superprojects.config`::
272
- definitions for so-called "superproject" multi-repos
273
-
274
271
  REFERENCES
275
272
  ----------
276
273
 
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 10.1.1" />
7
+ <meta name="generator" content="AsciiDoc 10.2.0" />
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>v6.0.0</code> of <em>git multi</em> &#8230; hooray!</p></div>
751
+ <div class="paragraph"><p>This is <code>v8.0.1</code> of <em>git multi</em> &#8230; hooray!</p></div>
752
752
  </div>
753
753
  </div>
754
754
  <div class="sect1">
@@ -1140,7 +1140,7 @@ subscribers_url subscription_url svn_url
1140
1140
  tags_url teams_url temp_clone_token
1141
1141
  topics trees_url updated_at
1142
1142
  url visibility watchers
1143
- watchers_count</code></pre>
1143
+ watchers_count web_commit_signoff_required</code></pre>
1144
1144
  </div></div>
1145
1145
  </div>
1146
1146
  </div>
@@ -1200,14 +1200,6 @@ git multi ++&lt;multi_repo&gt; --find 'language == "Ruby"' | git multi --raw 'ca
1200
1200
  local, binary cache of GitHub repository metadata
1201
1201
  </p>
1202
1202
  </dd>
1203
- <dt class="hdlist1">
1204
- <code>${HOME}/.git/multi/superprojects.config</code>
1205
- </dt>
1206
- <dd>
1207
- <p>
1208
- definitions for so-called "superproject" multi-repos
1209
- </p>
1210
- </dd>
1211
1203
  </dl></div>
1212
1204
  </div>
1213
1205
  </div>
@@ -1241,7 +1233,7 @@ the <code>jq</code> command-line utility:
1241
1233
  <div id="footer">
1242
1234
  <div id="footer-text">
1243
1235
  Last updated
1244
- 2022-02-02 12:24:05 GMT
1236
+ 2022-08-01 12:35:33 BST
1245
1237
  </div>
1246
1238
  </div>
1247
1239
  </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: 6.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-02 00:00:00.000000000 Z
11
+ date: 2022-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -204,7 +204,11 @@ post_install_message: "\nThe only required setting for \e[1mgit multi\e[0m is:\n
204
204
  config --global --add \e[1mgit.multi.users\e[0m <list_of_github_users>\n\tgit config
205
205
  --global --add \e[1mgit.multi.organizations\e[0m <list_of_github_orgs>\n\nUnless
206
206
  your top-level workarea is `${HOME}/Workarea` you should also set:\n\n\tgit config
207
- --global --add \e[1mgit.multi.workarea\e[0m <your_root_workarea>\n\nThanks for using
207
+ --global --add \e[1mgit.multi.workarea\e[0m <your_root_workarea>\n\nYou can specify
208
+ a list of user or organization repositories to ignore:\n\n\tgit config --global
209
+ --add \e[1mgit.multi.exclude\e[0m <org_name>/<repo_name>\n\tgit config --global
210
+ --add \e[1mgit.multi.exclude\e[0m <user_name>/<repo_name>\n\n(can be used multiple
211
+ times to exclude multiple user or organization repositories)\n\nThanks for using
208
212
  \e[1mgit multi\e[0m ... the ultimate multi-repo utility for git!\n\n"
209
213
  rdoc_options: []
210
214
  require_paths:
@@ -216,7 +220,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
220
  version: 2.6.0
217
221
  - - "<"
218
222
  - !ruby/object:Gem::Version
219
- version: 2.7.0
223
+ version: 3.0.0
220
224
  required_rubygems_version: !ruby/object:Gem::Requirement
221
225
  requirements:
222
226
  - - ">="