eac_git 0.18.0 → 0.18.2

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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eac_git/local/changed_file.rb +6 -0
  3. data/lib/eac_git/local/remote.rb +0 -2
  4. data/lib/eac_git/local/subrepo/config.rb +2 -0
  5. data/lib/eac_git/local.rb +1 -1
  6. data/lib/eac_git/remote_like/ls_result.rb +1 -1
  7. data/lib/eac_git/remote_like.rb +0 -1
  8. data/lib/eac_git/rspec/stubbed_git_local_repo.rb +0 -2
  9. data/lib/eac_git/rspec.rb +0 -1
  10. data/lib/eac_git/version.rb +1 -1
  11. data/lib/eac_git.rb +0 -2
  12. data/vendor/git-subrepo/.fish.rc +20 -0
  13. data/vendor/git-subrepo/.gitattributes +1 -0
  14. data/vendor/git-subrepo/.github/workflows/test.yml +29 -0
  15. data/vendor/git-subrepo/.gitignore +1 -0
  16. data/vendor/git-subrepo/.gitrepo +7 -0
  17. data/vendor/git-subrepo/.rc +32 -0
  18. data/vendor/git-subrepo/Changes +66 -0
  19. data/vendor/git-subrepo/Intro.pod +2 -5
  20. data/vendor/git-subrepo/Makefile +45 -5
  21. data/vendor/git-subrepo/Meta +2 -2
  22. data/vendor/git-subrepo/ReadMe.pod +26 -31
  23. data/vendor/git-subrepo/doc/git-subrepo.swim +22 -18
  24. data/vendor/git-subrepo/doc/intro-to-subrepo.swim +2 -4
  25. data/vendor/git-subrepo/ext/bashplus/.gitrepo +12 -0
  26. data/vendor/git-subrepo/ext/bashplus/.travis.yml +6 -0
  27. data/vendor/git-subrepo/ext/bashplus/Changes +19 -0
  28. data/vendor/git-subrepo/ext/bashplus/License +1 -1
  29. data/vendor/git-subrepo/ext/bashplus/Makefile +25 -0
  30. data/vendor/git-subrepo/ext/bashplus/Meta +4 -4
  31. data/vendor/git-subrepo/ext/bashplus/ReadMe.pod +2 -2
  32. data/vendor/git-subrepo/ext/bashplus/bin/bash+ +8 -7
  33. data/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +1 -1
  34. data/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +85 -38
  35. data/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +8 -8
  36. data/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +8 -8
  37. data/vendor/git-subrepo/ext/bashplus/test/base.t +4 -5
  38. data/vendor/git-subrepo/ext/bashplus/test/die.t +16 -0
  39. data/vendor/git-subrepo/ext/bashplus/test/fcopy.t +2 -3
  40. data/vendor/git-subrepo/ext/bashplus/test/{test.bash → setup} +18 -8
  41. data/vendor/git-subrepo/ext/bashplus/test/shellcheck.t +37 -0
  42. data/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +10 -11
  43. data/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +10 -11
  44. data/vendor/git-subrepo/ext/bashplus/test/use.t +8 -5
  45. data/vendor/git-subrepo/ext/bashplus/test/version-check.t +23 -0
  46. data/vendor/git-subrepo/ext/test-more-bash/.gitrepo +12 -0
  47. data/vendor/git-subrepo/ext/test-more-bash/.travis.yml +6 -0
  48. data/vendor/git-subrepo/ext/test-more-bash/Changes +11 -0
  49. data/vendor/git-subrepo/ext/test-more-bash/License +1 -1
  50. data/vendor/git-subrepo/ext/test-more-bash/Makefile +25 -0
  51. data/vendor/git-subrepo/ext/test-more-bash/Meta +5 -5
  52. data/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +9 -3
  53. data/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +7 -2
  54. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.gitrepo +12 -0
  55. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.travis.yml +6 -0
  56. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +11 -0
  57. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +1 -1
  58. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +25 -0
  59. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +3 -3
  60. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +2 -2
  61. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +8 -7
  62. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +1 -1
  63. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +85 -38
  64. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +8 -8
  65. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +8 -8
  66. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +4 -4
  67. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/die.t +17 -0
  68. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +2 -2
  69. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/{test.bash → setup} +17 -8
  70. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/shellcheck.t +38 -0
  71. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +10 -10
  72. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +10 -10
  73. data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +8 -4
  74. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.gitrepo +12 -0
  75. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.travis.yml +5 -0
  76. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +11 -0
  77. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +1 -1
  78. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +30 -0
  79. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +3 -3
  80. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +2 -2
  81. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +1 -1
  82. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +46 -42
  83. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +8 -8
  84. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +1 -1
  85. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +1 -1
  86. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +1 -1
  87. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +1 -1
  88. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/shellcheck.t +42 -0
  89. data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +11 -5
  90. data/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +35 -15
  91. data/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +16 -10
  92. data/vendor/git-subrepo/ext/test-more-bash/test/fail.t +15 -1
  93. data/vendor/git-subrepo/ext/test-more-bash/test/more.t +12 -4
  94. data/vendor/git-subrepo/ext/test-more-bash/test/setup +3 -3
  95. data/vendor/git-subrepo/ext/test-more-bash/test/shellcheck.t +35 -0
  96. data/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +14 -1
  97. data/vendor/git-subrepo/lib/git-subrepo +375 -260
  98. data/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +21 -22
  99. data/vendor/git-subrepo/man/man1/git-subrepo.1 +125 -141
  100. data/vendor/git-subrepo/pkg/bin/generate-completion.pl +0 -7
  101. data/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +0 -2
  102. data/vendor/git-subrepo/share/completion.bash +1 -3
  103. data/vendor/git-subrepo/share/enable-completion.sh +3 -3
  104. data/vendor/git-subrepo/share/zsh-completion/_git-subrepo +2 -7
  105. data/vendor/git-subrepo/test/Dockerfile +112 -0
  106. data/vendor/git-subrepo/test/branch-all.t +6 -6
  107. data/vendor/git-subrepo/test/branch-rev-list-one-path.t +7 -8
  108. data/vendor/git-subrepo/test/branch-rev-list.t +7 -8
  109. data/vendor/git-subrepo/test/branch.t +9 -9
  110. data/vendor/git-subrepo/test/clean.t +3 -3
  111. data/vendor/git-subrepo/test/clone-annotated-tag.t +7 -7
  112. data/vendor/git-subrepo/test/clone.t +20 -25
  113. data/vendor/git-subrepo/test/config.t +7 -6
  114. data/vendor/git-subrepo/test/encode.t +17 -17
  115. data/vendor/git-subrepo/test/error.t +18 -18
  116. data/vendor/git-subrepo/test/fetch.t +4 -4
  117. data/vendor/git-subrepo/test/gitignore.t +8 -8
  118. data/vendor/git-subrepo/test/init.t +6 -7
  119. data/vendor/git-subrepo/test/issue29.t +3 -3
  120. data/vendor/git-subrepo/test/issue95.t +2 -2
  121. data/vendor/git-subrepo/test/issue96.t +3 -3
  122. data/vendor/git-subrepo/test/pull-all.t +5 -5
  123. data/vendor/git-subrepo/test/pull-merge.t +16 -15
  124. data/vendor/git-subrepo/test/pull-message.t +12 -12
  125. data/vendor/git-subrepo/test/pull-new-branch.t +8 -7
  126. data/vendor/git-subrepo/test/pull-ours.t +10 -10
  127. data/vendor/git-subrepo/test/pull-theirs.t +8 -8
  128. data/vendor/git-subrepo/test/pull-twice.t +4 -4
  129. data/vendor/git-subrepo/test/pull-worktree.t +5 -5
  130. data/vendor/git-subrepo/test/pull.t +14 -14
  131. data/vendor/git-subrepo/test/push-after-init.t +7 -6
  132. data/vendor/git-subrepo/test/push-after-push-no-changes.t +27 -0
  133. data/vendor/git-subrepo/test/push-force.t +7 -6
  134. data/vendor/git-subrepo/test/push-new-branch.t +10 -10
  135. data/vendor/git-subrepo/test/push-no-changes.t +3 -3
  136. data/vendor/git-subrepo/test/push-squash.t +7 -7
  137. data/vendor/git-subrepo/test/push.t +35 -34
  138. data/vendor/git-subrepo/test/rebase.t +63 -0
  139. data/vendor/git-subrepo/test/reclone.t +15 -8
  140. data/vendor/git-subrepo/test/setup +62 -55
  141. data/vendor/git-subrepo/test/shellcheck.t +37 -0
  142. data/vendor/git-subrepo/test/status.t +47 -27
  143. data/vendor/git-subrepo/test/submodule.t +4 -4
  144. data/vendor/git-subrepo/test/zsh.t +27 -0
  145. metadata +45 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3daa829b6232f56446b82684a071ebcf939bd1e98307284a2c9b559b881a70b
4
- data.tar.gz: 6ddd44efac225b1813761e4e4a4de0e7d3a4e3d2a8a45e386ee49a59ddd3c1e6
3
+ metadata.gz: 97abca2bae305c62a10830e563e640d9b9373fcb05af38b5e0c7ccd31fdb9158
4
+ data.tar.gz: 39ceeb6a1df4e4c03dda2207418d65b34c09f268a297bf250aa3bb8e8407e41f
5
5
  SHA512:
6
- metadata.gz: 5ff9b942f598fd22e0e7eec9de6ef7932ee78d069cba3e226e771c5430f2b0ddcc23d9716da160e6b172683d787d0765a062ac737052e1dde119a69bb4dc6ef0
7
- data.tar.gz: 3312de1776a0e748bf271669e5a16fc4f2cd1c8d903530bb8715c8827d00629609600d11bfbfe44f2c14609a8b6956ffdbcbed24d18a6299147db7f1108b092d
6
+ metadata.gz: 7a388edee6bb00a8e2fe9a6e110bbb4ab59eb23927192080c57ad587346bab65ed62b8dc7391e52ee44c71e8f48f7fcf6fea611fd3a77701bed464d657cdd38c
7
+ data.tar.gz: 00b092015373876a2617953681e0ae32da4cc25f19a673a56d4b43e08617eae07fb1abeb1b5dc09ff0a41c60ecbcc579ee23dc6b560093c65045c98d73afb18d
@@ -5,6 +5,7 @@ module EacGit
5
5
  class ChangedFile
6
6
  QUOTED_PATH_PATTERN = /\A"(.+)"\z/.freeze
7
7
  STATUS_LINE_PATTERN = /\A(.)(.)\s(.+)\z/.freeze
8
+ TO_HASH_ATTRIBUTES = %i[absolute_path index path worktree].freeze
8
9
 
9
10
  class << self
10
11
  def by_porcelain_v1_line(local_repo, line)
@@ -42,6 +43,11 @@ module EacGit
42
43
  def modify?
43
44
  [index, worktree].include?('M')
44
45
  end
46
+
47
+ # @return [Hash]
48
+ def to_h
49
+ compact_to_h(*TO_HASH_ATTRIBUTES)
50
+ end
45
51
  end
46
52
  end
47
53
  end
@@ -40,8 +40,6 @@ module EacGit
40
40
  def url=(new_url)
41
41
  local.command('remote', 'set-url', name, new_url).execute!
42
42
  end
43
-
44
- require_sub __FILE__
45
43
  end
46
44
  end
47
45
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'parseconfig'
4
+
3
5
  module EacGit
4
6
  class Local
5
7
  class Subrepo
data/lib/eac_git/local.rb CHANGED
@@ -74,7 +74,7 @@ module EacGit
74
74
 
75
75
  def merge_base(*commits)
76
76
  refs = commits.dup
77
- while refs.count > 1
77
+ while refs.count > 1 # rubocop:disable Style/CollectionQuerying
78
78
  refs[1] = merge_base_pair(refs[0], refs[1])
79
79
  return nil if refs[1].blank?
80
80
 
@@ -6,7 +6,7 @@ module EacGit
6
6
  class << self
7
7
  def by_ls_remote_command_output(output)
8
8
  new(
9
- output.each_line.map { |line| line.strip.split(/\s+/) }.to_h { |x| [x[1], x[0]] } # rubocop:disable Style/MapToHash
9
+ output.each_line.map { |line| line.strip.split(/\s+/) }.to_h { |x| [x[1], x[0]] }
10
10
  )
11
11
  end
12
12
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  module EacGit
4
4
  module RemoteLike
5
- require_sub __FILE__
6
5
  enable_abstract_methods
7
6
 
8
7
  # @return [String] The output of command "git fetch".
@@ -21,8 +21,6 @@ module EacGit
21
21
  r << '--bare' if bare
22
22
  r + [path]
23
23
  end
24
-
25
- require_sub __FILE__
26
24
  end
27
25
  end
28
26
  end
data/lib/eac_git/rspec.rb CHANGED
@@ -2,6 +2,5 @@
2
2
 
3
3
  module EacGit
4
4
  module Rspec
5
- require_sub __FILE__
6
5
  end
7
6
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.18.0'
4
+ VERSION = '0.18.2'
5
5
  end
data/lib/eac_git.rb CHANGED
@@ -3,7 +3,5 @@
3
3
  require 'eac_ruby_utils'
4
4
  EacRubyUtils::RootModuleSetup.perform __FILE__
5
5
 
6
- require 'parseconfig'
7
-
8
6
  module EacGit
9
7
  end
@@ -0,0 +1,20 @@
1
+ #!fish
2
+
3
+ #------------------------------------------------------------------------------
4
+ #
5
+ # This is the `git-subrepo` initialization script.
6
+ #
7
+ # This script turns on the `git-subrepo` Git subcommand and its manpages, for
8
+ # the *Fish* shell.
9
+ #
10
+ # Just add a line like this to your `~/.config/fish/config.fish`:
11
+ #
12
+ # source /path/to/git-subrepo/.fish.rc
13
+ #
14
+ #------------------------------------------------------------------------------
15
+
16
+ set GIT_SUBREPO_ROOT (dirname (realpath (status --current-filename)))
17
+ set PATH $GIT_SUBREPO_ROOT/lib $PATH
18
+
19
+ set -q MANPATH || set MANPATH ''
20
+ set MANPATH $MANPATH $GIT_SUBREPO_ROOT/man
@@ -0,0 +1 @@
1
+ * text eol=lf
@@ -0,0 +1,29 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ '*' ]
6
+ pull_request:
7
+ branches: [ '*' ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - if: startsWith(matrix.os, 'macos')
19
+ run: brew install bash
20
+ - run:
21
+ git config --global user.email "you@example.com";
22
+ git config --global user.name "Your Name";
23
+ git config --global init.defaultBranch "master";
24
+ git config --global --add safe.directory "$PWD";
25
+ git config --global --add safe.directory "$PWD.git";
26
+ - if: startsWith(matrix.os, 'macos')
27
+ run: make test
28
+ - if: startsWith(matrix.os, 'ubuntu')
29
+ run: make docker-tests
@@ -0,0 +1 @@
1
+ /test/tmp/
@@ -0,0 +1,7 @@
1
+ [subrepo]
2
+ cmdver = 0.4.9
3
+ commit = a15c74247acfca764711e5589e77d79472fcaab4
4
+ method = merge
5
+ parent = 84ec4ccc74f3d3542195d2204c4d7f6b52c86832
6
+ branch = master
7
+ remote = https://github.com/esquilo-azul/git-subrepo.git
@@ -0,0 +1,32 @@
1
+ # shellcheck shell=bash disable=2128
2
+
3
+ #------------------------------------------------------------------------------
4
+ #
5
+ # This is the `git-subrepo` initialization script.
6
+ #
7
+ # This script turns on the `git-subrepo` Git subcommand, its manpages and TAB
8
+ # completion for the *Bash* and *zsh* shells.
9
+ #
10
+ # Just add a line like this to your shell startup configuration:
11
+ #
12
+ # source /path/to/git-subrepo/.rc
13
+ #
14
+ #------------------------------------------------------------------------------
15
+
16
+ [[ -n ${ZSH_VERSION-} ]] &&
17
+ GIT_SUBREPO_ROOT=$0 ||
18
+ GIT_SUBREPO_ROOT=$BASH_SOURCE
19
+
20
+ [[ $GIT_SUBREPO_ROOT =~ ^/ ]] ||
21
+ GIT_SUBREPO_ROOT=$PWD/$GIT_SUBREPO_ROOT
22
+
23
+ GIT_SUBREPO_ROOT=$(
24
+ cd "$(dirname "$GIT_SUBREPO_ROOT")" || return
25
+ pwd
26
+ ) || return
27
+ export GIT_SUBREPO_ROOT
28
+
29
+ export PATH=$GIT_SUBREPO_ROOT/lib:$PATH
30
+ export MANPATH=$GIT_SUBREPO_ROOT/man:$MANPATH
31
+
32
+ source "$GIT_SUBREPO_ROOT/share/enable-completion.sh"
@@ -1,3 +1,69 @@
1
+ version: 0.4.9
2
+ date: Mon 25 Jul 2024 11:23:34 AM CST
3
+ - Revert Fix bash-completion due to not being compatible with Windows
4
+ ---
5
+ version: 0.4.8
6
+ date: Mon 22 Jul 2024 07:40:00 AM CST
7
+ - Remove all subrepo refs with clean --force
8
+ - Allow the error() function to accept multiple arguments
9
+ - Bug fixed where clone --force could change the tracked branch
10
+ - Give a detailed error message if the parent SHA could not be found
11
+ - Use the git configuration to determine the default branch name for the init command
12
+ - Add --force to fetch command
13
+ - Fix executable settings on installed files
14
+ - Remove shebangs from library only files
15
+ - Fix bash-completion for instances that used make install
16
+ ---
17
+ version: 0.4.7
18
+ date: Sun 7 Jul 2024 11:04:00 AM EST
19
+ - Convert testing to use docker with updated git versions
20
+ - Fix numerous places where quoting was incorrect causing path name collisions
21
+ - Fix pull-force test to deal with git not defaulting to merges on pulls after 2.33
22
+ - Fix issue where docker tests didn't work with git 2.30 or higher because of
23
+ increased permission scrutiny.
24
+ - Update readme to say this tools is in production environments
25
+ - Update readme to use internet archive for old articles about subrepo no longer
26
+ available on their original source
27
+ ---
28
+ version: 0.4.6
29
+ date: Fri 21 Apr 2023 10:18:34 AM EST
30
+ - Remove stale worktrees in the push command
31
+ ---
32
+ version: 0.4.5
33
+ date: Thu 22 Sep 2022 23:03:24 PM EST
34
+ - Add --file option
35
+ - Fix git subrepo status command for subrepos that share a common prefix. Closes #534.
36
+ - Don't allow -b and --all
37
+ - Fix documentation links
38
+ - fix tests to support use of a default branch git config that is not "master"
39
+ - pass --force to git add so a user's global .gitignore does not affect tests
40
+ - Fix .rc and enable-completion.sh for zsh before 5.1
41
+ - Better format for options
42
+ - The `fpath` variable is an array; expand correctly
43
+ ---
44
+ version: 0.4.3
45
+ date: Sat 21 Nov 2020 03:28:43 PM EST
46
+ - Apply PR#511 to fix a 0.4.2 regression in zsh
47
+ ---
48
+ version: 0.4.2
49
+ date: Tue Nov 17 14:10:10 CST 2020
50
+ - Covert to GitHub Actions for testing
51
+ - Add docker support to test multiple git/bash versions together
52
+ - Require Bash 4.0+
53
+ - Use shellcheck as linter and address issues discovered
54
+ - Discovered bug in git where @ is not a valid workspace name
55
+ - Add --force command to subrepo pull
56
+ - Now works with paths that contain spaces
57
+ - Numerous documentation fixes
58
+ - When two branches pointed to the same commit, we would
59
+ sometimes pick the wrong branch.
60
+ - ZSH completion fixes
61
+ - Allow tests to run outside a git repo
62
+ - Would not work if a different date format was set in git config
63
+ - Address delay in filter-branch on newer versions of git
64
+ - Display the git merge message on merge failure
65
+ - Allow FISH integration on MacOS.
66
+ - Add manpage support for FISH shell
1
67
  ---
2
68
  version: 0.4.1
3
69
  date: Thu Jan 9 17:11:21 CST 2020
@@ -78,7 +78,7 @@ Submodules tend to receive a lot of bad press. Here's some of it:
78
78
 
79
79
  =item * L<http://ayende.com/blog/4746/the-problem-with-git-submodules>
80
80
 
81
- =item * L<http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/>
81
+ =item * L<https://web.archive.org/web/20171101202911/http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/>
82
82
 
83
83
  =item * L<http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/>
84
84
 
@@ -307,13 +307,10 @@ Good:
307
307
 
308
308
  =item * Bash code is very simple and easy to follow.
309
309
 
310
- =item * Comprehensive test suite. Currently passing on travis:
310
+ =item * Comprehensive test suite.
311
311
 
312
312
  =back
313
313
 
314
- =for html
315
- <a href="https://travis-ci.org/ingydotnet/git-subrepo"><img src="https://travis-ci.org/ingydotnet/git-subrepo.png" alt="git-subrepo"></a>
316
-
317
314
  Bad:
318
315
 
319
316
  =over
@@ -1,4 +1,6 @@
1
- # Make sure we have 'git' and it works OK:
1
+ SHELL := bash
2
+
3
+ # Make sure we have git:
2
4
  ifeq ($(shell which git),)
3
5
  $(error 'git' is not installed on this system)
4
6
  endif
@@ -19,6 +21,18 @@ INSTALL_LIB ?= $(DESTDIR)$(shell git --exec-path)
19
21
  INSTALL_EXT ?= $(INSTALL_LIB)/$(NAME).d
20
22
  INSTALL_MAN1 ?= $(DESTDIR)$(PREFIX)/share/man/man1
21
23
 
24
+ # Docker variables:
25
+ DOCKER_TAG ?= 0.0.6
26
+ DOCKER_IMAGE := ingy/bash-testing:$(DOCKER_TAG)
27
+ BASH_VERSIONS ?= 5.1 5.0 4.4 4.3 4.2 4.1 4.0
28
+ DOCKER_TESTS := $(BASH_VERSIONS:%=docker-test-%)
29
+ GIT_VERSIONS := 2.45 2.40 2.30 2.29 2.25 2.17 2.7
30
+
31
+ prove ?=
32
+ test ?= test/
33
+ bash ?= 5.1
34
+ git ?= 2.45
35
+
22
36
  # Basic targets:
23
37
  default: help
24
38
 
@@ -32,14 +46,24 @@ help:
32
46
 
33
47
  .PHONY: test
34
48
  test:
35
- prove $(PROVEOPT:%=% )test/
49
+ prove $(prove) $(test)
50
+
51
+ test-all: test docker-tests
52
+
53
+ docker-test:
54
+ $(call docker-make-test,$(bash),$(git))
55
+
56
+ docker-tests: $(DOCKER_TESTS)
57
+
58
+ $(DOCKER_TESTS):
59
+ $(call docker-make-test,$(@:docker-test-%=%),$(git))
36
60
 
37
61
  # Install support:
38
62
  install:
39
63
  install -d -m 0755 $(INSTALL_LIB)/
40
64
  install -C -m 0755 $(LIB) $(INSTALL_LIB)/
41
65
  install -d -m 0755 $(INSTALL_EXT)/
42
- install -C -m 0755 $(EXTS) $(INSTALL_EXT)/
66
+ install -C -m 0644 $(EXTS) $(INSTALL_EXT)/
43
67
  install -d -m 0755 $(INSTALL_MAN1)/
44
68
  install -C -m 0644 $(MAN1)/$(NAME).1 $(INSTALL_MAN1)/
45
69
 
@@ -78,5 +102,21 @@ compgen: force
78
102
  perl pkg/bin/generate-completion.pl zsh $(DOC) $(LIB) > \
79
103
  $(SHARE)/zsh-completion/_git-subrepo
80
104
 
81
- clean purge:
82
- rm -fr tmp
105
+ clean:
106
+ rm -fr tmp test/tmp
107
+
108
+ define docker-make-test
109
+ docker run --rm \
110
+ -v $(PWD):/git-subrepo \
111
+ -w /git-subrepo \
112
+ $(DOCKER_IMAGE) \
113
+ /bin/bash -c ' \
114
+ set -x && \
115
+ [[ -d /bash-$(1) ]] && \
116
+ [[ -d /git-$(2) ]] && \
117
+ export PATH=/bash-$(1)/bin:/git-$(2)/bin:$$PATH && \
118
+ bash --version && \
119
+ git --version && \
120
+ make test prove=$(prove) test=$(test) \
121
+ '
122
+ endef
@@ -1,11 +1,11 @@
1
1
  =meta: 0.0.2
2
2
 
3
3
  name: git-subrepo
4
- version: 0.4.1
4
+ version: 0.4.9
5
5
  abstract: Git Submodule Alternative
6
6
  homepage: https://github.com/ingydotnet/git-subrepo#readme
7
7
  license: MIT
8
- copyright: 2013-2020
8
+ copyright: 2013-2024
9
9
 
10
10
  author:
11
11
  name: Ingy döt Net
@@ -10,9 +10,6 @@ See http://github.com/ingydotnet/swim-pm#readme
10
10
 
11
11
  git-subrepo - Git Submodule Alternative
12
12
 
13
- =for html
14
- <a href="https://travis-ci.org/ingydotnet/git-subrepo"><img src="https://travis-ci.org/ingydotnet/git-subrepo.png" alt="git-subrepo"></a>
15
-
16
13
  =head1 Synopsis
17
14
 
18
15
  git subrepo -h # Help Overview
@@ -131,7 +128,7 @@ all the same arguments. Keep reading…
131
128
 
132
129
  =over
133
130
 
134
- =item C<< git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [-e] [--method <merge|rebase>] >>
131
+ =item C<< git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [--file=<msg file>] [-e] [--method <merge|rebase>] >>
135
132
 
136
133
  Add a repository as a subrepo in a subdir of your repository.
137
134
 
@@ -153,8 +150,8 @@ The C<--force> option will "reclone" (completely replace) an existing subdir.
153
150
  The C<--method> option will decide how the join process between branches are
154
151
  performed. The default option is merge.
155
152
 
156
- The C<clone> command accepts the C<--branch=> C<--edit>, C<--force> and C<--
157
- message=> options.
153
+ The C<clone> command accepts the C<--branch=> C<--edit>, C<--file>, C<--force>
154
+ and C<--message=> options.
158
155
 
159
156
  =item C<< git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method <merge|rebase>] >>
160
157
 
@@ -163,15 +160,13 @@ Turn an existing subdirectory into a subrepo.
163
160
  If you want to expose a subdirectory of your project as a published subrepo,
164
161
  this command will do that. It will split out the content of a normal
165
162
  subdirectory into a branch and start tracking it as a subrepo. Afterwards your
166
- original repo will look exactly the same except that there will be a C<<
167
- <subdir>/.gitrepo >> file.
163
+ original repo will look exactly the same except that there will be a C<<<subdir>/.gitrepo >> file.
168
164
 
169
165
  If you specify the C<--remote> (and optionally the C<--branch>) option, the
170
166
  values will be added to the C<< <subdir>/.gitrepo >> file. The C<--remote>
171
167
  option is the upstream URL, and the C<--branch> option is the upstream branch
172
168
  to push to. These values will be needed to do a C<git subrepo push> command,
173
- but they can be provided later on the C<push> command (and saved to C<<
174
- <subdir>/.gitrepo >> if you also specify the C<--update> option).
169
+ but they can be provided later on the C<push> command (and saved to C<<<subdir>/.gitrepo >> if you also specify the C<--update> option).
175
170
 
176
171
  Note: You will need to create the empty upstream repo and push to it on your
177
172
  own, using C<< git subrepo push <subdir> >>.
@@ -181,7 +176,7 @@ performed. The default option is merge.
181
176
 
182
177
  The C<init> command accepts the C<--branch=> and C<--remote=> options.
183
178
 
184
- =item C<< git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b <branch>] [-r <remote>] [-u] >>
179
+ =item C<< git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg file>] [-e] [-b <branch>] [-r <remote>] [-u] >>
185
180
 
186
181
  Update the subrepo subdir with the latest upstream changes.
187
182
 
@@ -226,10 +221,10 @@ clean. You can easily see the subrepo's history with the C<git log> command:
226
221
 
227
222
  The set of commands used above are described in detail below.
228
223
 
229
- The C<pull> command accepts the C<--all>, C<--branch=>, C<--edit>, C<--force>,
230
- C<--message=>, C<--remote=> and C<--update> options.
224
+ The C<pull> command accepts the C<--all>, C<--branch=>, C<--edit>, C<--file>,
225
+ C<--force>, C<--message=>, C<--remote=> and C<--update> options.
231
226
 
232
- =item C<< git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N] >>
227
+ =item C<< git subrepo push <subdir>|--all [<branch>] [-m msg] [--file=<msg file>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N] >>
233
228
 
234
229
  Push a properly merged subrepo branch back upstream.
235
230
 
@@ -253,11 +248,9 @@ The C<--force> option will do a force push. Force pushes are typically
253
248
  discouraged. Only use this option if you fully understand it. (The C<--force>
254
249
  option will NOT check for a proper merge. ANY branch will be force pushed!)
255
250
 
256
- The C<push> command accepts the C<--all>, C<--branch=>, C<--dry-run>, C<--
257
- force>, C<--merge>, C<--rebase>, C<--remote=>, C<--squash> and C<--
258
- update> options.
251
+ The C<push> command accepts the C<--all>, C<--branch=>, C<--dry-run>, C<--file>, C<--force>, C<--merge>, C<--message>, C<--rebase>, C<--remote=>, C<--squash> and C<--update> options.
259
252
 
260
- =item C<< git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>] >>
253
+ =item C<< git subrepo fetch <subdir>|--force --all [-r <remote>] [-b <branch>] >>
261
254
 
262
255
  Fetch the remote/upstream content for a subrepo.
263
256
 
@@ -266,8 +259,7 @@ points at the same commit as C<FETCH_HEAD>. It will also create a remote
266
259
  called C<< subrepo/<subdir> >>. These are temporary and you can easily remove
267
260
  them with the subrepo C<clean> command.
268
261
 
269
- The C<fetch> command accepts the C<--all>, C<--branch=> and C<--
270
- remote=> options.
262
+ The C<fetch> command accepts the C<--force>, C<--all>, C<--branch=> and C<--remote=> options.
271
263
 
272
264
  =item C<< git subrepo branch <subdir>|--all [-f] [-F] >>
273
265
 
@@ -283,12 +275,11 @@ Use the C<--force> option to write over an existing C<< subrepo/<subdir>
283
275
 
284
276
  The C<branch> command accepts the C<--all>, C<--fetch> and C<--force> options.
285
277
 
286
- =item C<< git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F] >>
278
+ =item C<< git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg file>] [-e] [-f] [-F] >>
287
279
 
288
280
  Add subrepo branch to current history as a single commit.
289
281
 
290
- This command is generally used after a hand-merge. You have done a C<subrepo
291
- branch> and merged (rebased) it with the upstream. This command takes the HEAD
282
+ This command is generally used after a hand-merge. You have done a C<subrepobranch> and merged (rebased) it with the upstream. This command takes the HEAD
292
283
  of that branch, puts its content into the subrepo subdir and adds a new commit
293
284
  for it to the top of your mainline history.
294
285
 
@@ -296,13 +287,12 @@ This command requires that the upstream HEAD be in the C<< subrepo/<subdir> >>
296
287
  branch history. That way the same branch can push upstream. Use the C<--force>
297
288
  option to commit anyway.
298
289
 
299
- The C<commit> command accepts the C<--edit>, C<--fetch>, C<--force> and C<--
300
- message=> options.
290
+ The C<commit> command accepts the C<--edit>, C<--fetch>, C<--file>, C<--force>
291
+ and C<--message=> options.
301
292
 
302
293
  =item C<< git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v] >>
303
294
 
304
- Get the status of a subrepo. Uses the C<--all> option by default. If the C<--
305
- quiet> flag is used, just print the subrepo names, one per line.
295
+ Get the status of a subrepo. Uses the C<--all> option by default. If the C<--quiet> flag is used, just print the subrepo names, one per line.
306
296
 
307
297
  The C<--verbose> option will show all the recent local and upstream commits.
308
298
 
@@ -419,6 +409,10 @@ Edit the commit message before committing.
419
409
 
420
410
  Use this option to fetch the upstream commits, before running the command.
421
411
 
412
+ =item C<< --file=<commit msg file> >>
413
+
414
+ Supply your own commit message from a file
415
+
422
416
  =item C<--force> (C<-f>)
423
417
 
424
418
  Use this option to force certain commands that fail in the general case.
@@ -489,8 +483,7 @@ The C<git-subrepo> command exports and honors some environment variables:
489
483
 
490
484
  =item C<GIT_SUBREPO_ROOT>
491
485
 
492
- This is set by the C<.rc> file, if you use that method to install / enable C<git-
493
- subrepo>. It contains the path of the C<git-subrepo> repository.
486
+ This is set by the C<.rc> file, if you use that method to install / enable C<git-subrepo>. It contains the path of the C<git-subrepo> repository.
494
487
 
495
488
  =item C<GIT_SUBREPO_RUNNING>
496
489
 
@@ -649,8 +642,8 @@ function is called:
649
642
 
650
643
  =head1 Status
651
644
 
652
- The git-subrepo command has been in use for well over a year and seems to get
653
- the job done. Development is still ongoing but mostly just for fixing bugs.
645
+ The git-subrepo command has been used in production and seems to get the job
646
+ done. Development is still ongoing but mostly just for fixing bugs.
654
647
 
655
648
  Trying subrepo out is simple and painless (this is not C<git submodule>).
656
649
  Nothing is permanent (if you do not push to shared remotes). ie You can always
@@ -687,6 +680,8 @@ C<irc.freenode.net>.
687
680
 
688
681
  =item * Magnus Carlsson <grimmymail@gmail.com>
689
682
 
683
+ =item * Austin Morgan <admorgan@morgancomputers.net>
684
+
690
685
  =back
691
686
 
692
687
  =head1 License and Copyright