eac_git 0.18.1 → 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.
- checksums.yaml +4 -4
- data/lib/eac_git/local/remote.rb +0 -2
- data/lib/eac_git/local/subrepo/config.rb +2 -0
- data/lib/eac_git/remote_like/ls_result.rb +1 -1
- data/lib/eac_git/remote_like.rb +0 -1
- data/lib/eac_git/rspec/stubbed_git_local_repo.rb +0 -2
- data/lib/eac_git/rspec.rb +0 -1
- data/lib/eac_git/version.rb +1 -1
- data/lib/eac_git.rb +0 -2
- data/vendor/git-subrepo/.fish.rc +20 -0
- data/vendor/git-subrepo/.gitattributes +1 -0
- data/vendor/git-subrepo/.github/workflows/test.yml +29 -0
- data/vendor/git-subrepo/.gitignore +1 -0
- data/vendor/git-subrepo/.gitrepo +7 -0
- data/vendor/git-subrepo/.rc +32 -0
- data/vendor/git-subrepo/Changes +66 -0
- data/vendor/git-subrepo/Intro.pod +2 -5
- data/vendor/git-subrepo/Makefile +45 -5
- data/vendor/git-subrepo/Meta +2 -2
- data/vendor/git-subrepo/ReadMe.pod +26 -31
- data/vendor/git-subrepo/doc/git-subrepo.swim +22 -18
- data/vendor/git-subrepo/doc/intro-to-subrepo.swim +2 -4
- data/vendor/git-subrepo/ext/bashplus/.gitrepo +12 -0
- data/vendor/git-subrepo/ext/bashplus/.travis.yml +6 -0
- data/vendor/git-subrepo/ext/bashplus/Changes +19 -0
- data/vendor/git-subrepo/ext/bashplus/License +1 -1
- data/vendor/git-subrepo/ext/bashplus/Makefile +25 -0
- data/vendor/git-subrepo/ext/bashplus/Meta +4 -4
- data/vendor/git-subrepo/ext/bashplus/ReadMe.pod +2 -2
- data/vendor/git-subrepo/ext/bashplus/bin/bash+ +8 -7
- data/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +1 -1
- data/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +85 -38
- data/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +8 -8
- data/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +8 -8
- data/vendor/git-subrepo/ext/bashplus/test/base.t +4 -5
- data/vendor/git-subrepo/ext/bashplus/test/die.t +16 -0
- data/vendor/git-subrepo/ext/bashplus/test/fcopy.t +2 -3
- data/vendor/git-subrepo/ext/bashplus/test/{test.bash → setup} +18 -8
- data/vendor/git-subrepo/ext/bashplus/test/shellcheck.t +37 -0
- data/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +10 -11
- data/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +10 -11
- data/vendor/git-subrepo/ext/bashplus/test/use.t +8 -5
- data/vendor/git-subrepo/ext/bashplus/test/version-check.t +23 -0
- data/vendor/git-subrepo/ext/test-more-bash/.gitrepo +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/.travis.yml +6 -0
- data/vendor/git-subrepo/ext/test-more-bash/Changes +11 -0
- data/vendor/git-subrepo/ext/test-more-bash/License +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/Makefile +25 -0
- data/vendor/git-subrepo/ext/test-more-bash/Meta +5 -5
- data/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +9 -3
- data/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +7 -2
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.gitrepo +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.travis.yml +6 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +11 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +25 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +3 -3
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +2 -2
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +8 -7
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +85 -38
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +8 -8
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +8 -8
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +4 -4
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/die.t +17 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +2 -2
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/{test.bash → setup} +17 -8
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/shellcheck.t +38 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +10 -10
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +10 -10
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +8 -4
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.gitrepo +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.travis.yml +5 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +11 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +30 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +3 -3
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +2 -2
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +46 -42
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +8 -8
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +1 -1
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/shellcheck.t +42 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +11 -5
- data/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +35 -15
- data/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +16 -10
- data/vendor/git-subrepo/ext/test-more-bash/test/fail.t +15 -1
- data/vendor/git-subrepo/ext/test-more-bash/test/more.t +12 -4
- data/vendor/git-subrepo/ext/test-more-bash/test/setup +3 -3
- data/vendor/git-subrepo/ext/test-more-bash/test/shellcheck.t +35 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +14 -1
- data/vendor/git-subrepo/lib/git-subrepo +375 -260
- data/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +21 -22
- data/vendor/git-subrepo/man/man1/git-subrepo.1 +125 -141
- data/vendor/git-subrepo/pkg/bin/generate-completion.pl +0 -7
- data/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +0 -2
- data/vendor/git-subrepo/share/completion.bash +1 -3
- data/vendor/git-subrepo/share/enable-completion.sh +3 -3
- data/vendor/git-subrepo/share/zsh-completion/_git-subrepo +2 -7
- data/vendor/git-subrepo/test/Dockerfile +112 -0
- data/vendor/git-subrepo/test/branch-all.t +6 -6
- data/vendor/git-subrepo/test/branch-rev-list-one-path.t +7 -8
- data/vendor/git-subrepo/test/branch-rev-list.t +7 -8
- data/vendor/git-subrepo/test/branch.t +9 -9
- data/vendor/git-subrepo/test/clean.t +3 -3
- data/vendor/git-subrepo/test/clone-annotated-tag.t +7 -7
- data/vendor/git-subrepo/test/clone.t +20 -25
- data/vendor/git-subrepo/test/config.t +7 -6
- data/vendor/git-subrepo/test/encode.t +17 -17
- data/vendor/git-subrepo/test/error.t +18 -18
- data/vendor/git-subrepo/test/fetch.t +4 -4
- data/vendor/git-subrepo/test/gitignore.t +8 -8
- data/vendor/git-subrepo/test/init.t +6 -7
- data/vendor/git-subrepo/test/issue29.t +3 -3
- data/vendor/git-subrepo/test/issue95.t +2 -2
- data/vendor/git-subrepo/test/issue96.t +3 -3
- data/vendor/git-subrepo/test/pull-all.t +5 -5
- data/vendor/git-subrepo/test/pull-merge.t +16 -15
- data/vendor/git-subrepo/test/pull-message.t +12 -12
- data/vendor/git-subrepo/test/pull-new-branch.t +8 -7
- data/vendor/git-subrepo/test/pull-ours.t +10 -10
- data/vendor/git-subrepo/test/pull-theirs.t +8 -8
- data/vendor/git-subrepo/test/pull-twice.t +4 -4
- data/vendor/git-subrepo/test/pull-worktree.t +5 -5
- data/vendor/git-subrepo/test/pull.t +14 -14
- data/vendor/git-subrepo/test/push-after-init.t +7 -6
- data/vendor/git-subrepo/test/push-after-push-no-changes.t +27 -0
- data/vendor/git-subrepo/test/push-force.t +7 -6
- data/vendor/git-subrepo/test/push-new-branch.t +10 -10
- data/vendor/git-subrepo/test/push-no-changes.t +3 -3
- data/vendor/git-subrepo/test/push-squash.t +7 -7
- data/vendor/git-subrepo/test/push.t +35 -34
- data/vendor/git-subrepo/test/rebase.t +63 -0
- data/vendor/git-subrepo/test/reclone.t +15 -8
- data/vendor/git-subrepo/test/setup +62 -55
- data/vendor/git-subrepo/test/shellcheck.t +37 -0
- data/vendor/git-subrepo/test/status.t +47 -27
- data/vendor/git-subrepo/test/submodule.t +4 -4
- data/vendor/git-subrepo/test/zsh.t +27 -0
- metadata +45 -19
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
# DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
|
|
5
5
|
|
|
6
|
-
if [[ -z $GIT_SUBREPO_ROOT ]]; then
|
|
7
|
-
echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
|
|
8
|
-
return 3
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
6
|
_git-subrepo() {
|
|
12
7
|
typeset -A opt_args
|
|
13
8
|
local curcontext="$curcontext" state line context
|
|
@@ -24,9 +19,9 @@ _git-subrepo() {
|
|
|
24
19
|
'(-e --edit)'{-e,--edit}'[Edit commit message]' \
|
|
25
20
|
'(-f --force)'{-f,--force}'[Force certain operations]' \
|
|
26
21
|
'(-F --fetch)'{-F,--fetch}'[Fetch the upstream content first]' \
|
|
27
|
-
'(-M --method)'{-M,--method}'[
|
|
28
|
-
'--Default[is '"'"'merge'"'"']' \
|
|
22
|
+
'(-M --method)'{-M,--method}'[Join method: '"'"'merge'"'"' (default) or '"'"'rebase'"'"']:M' \
|
|
29
23
|
'(-m --message)'{-m,--message}'[Specify a commit message]:m' \
|
|
24
|
+
'--file[Specify a commit message file]:file' \
|
|
30
25
|
'(-r --remote)'{-r,--remote}'[Specify the upstream remote to push/pull/fetch]:r' \
|
|
31
26
|
'(-s --squash)'{-s,--squash}'[Squash commits on push]' \
|
|
32
27
|
'(-u --update)'{-u,--update}'[Add the --branch and/or --remote overrides to .gitrepo]' \
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
FROM ubuntu:20.04
|
|
2
|
+
|
|
3
|
+
RUN apt-get update
|
|
4
|
+
|
|
5
|
+
RUN apt-get install -y \
|
|
6
|
+
bison \
|
|
7
|
+
build-essential \
|
|
8
|
+
git \
|
|
9
|
+
vim \
|
|
10
|
+
wget \
|
|
11
|
+
&& true
|
|
12
|
+
|
|
13
|
+
# Install shellcheck-0.7.1
|
|
14
|
+
RUN cd /root \
|
|
15
|
+
&& wget https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz \
|
|
16
|
+
&& tar xf shellcheck-v0.7.1.linux.x86_64.tar.xz \
|
|
17
|
+
&& mv shellcheck-v0.7.1/shellcheck /usr/local/bin/ \
|
|
18
|
+
&& rm -fr shellcheck* \
|
|
19
|
+
&& true
|
|
20
|
+
|
|
21
|
+
# Build/install bash-3.2.57
|
|
22
|
+
RUN cd /root \
|
|
23
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz \
|
|
24
|
+
&& tar -xzf bash-3.2.57.tar.gz \
|
|
25
|
+
&& cd bash-3.2.57 \
|
|
26
|
+
&& ./configure --prefix=/bash-3.2 \
|
|
27
|
+
&& make \
|
|
28
|
+
&& make install \
|
|
29
|
+
&& rm -fr bash* \
|
|
30
|
+
&& true
|
|
31
|
+
|
|
32
|
+
# Buil/install bash-4.0
|
|
33
|
+
RUN cd /root \
|
|
34
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-4.0.tar.gz \
|
|
35
|
+
&& tar -xzf bash-4.0.tar.gz \
|
|
36
|
+
&& cd bash-4.0 \
|
|
37
|
+
&& ./configure --prefix=/bash-4.0 \
|
|
38
|
+
&& make \
|
|
39
|
+
&& make install \
|
|
40
|
+
&& rm -fr bash* \
|
|
41
|
+
&& true
|
|
42
|
+
|
|
43
|
+
# Buil/install bash-4.1
|
|
44
|
+
RUN cd /root \
|
|
45
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz \
|
|
46
|
+
&& tar -xzf bash-4.1.tar.gz \
|
|
47
|
+
&& cd bash-4.1 \
|
|
48
|
+
&& ./configure --prefix=/bash-4.1 \
|
|
49
|
+
&& make \
|
|
50
|
+
&& make install \
|
|
51
|
+
&& rm -fr bash* \
|
|
52
|
+
&& true
|
|
53
|
+
|
|
54
|
+
# Buil/install bash-4.2
|
|
55
|
+
RUN cd /root \
|
|
56
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz \
|
|
57
|
+
&& tar -xzf bash-4.2.tar.gz \
|
|
58
|
+
&& cd bash-4.2 \
|
|
59
|
+
&& ./configure --prefix=/bash-4.2 \
|
|
60
|
+
&& make \
|
|
61
|
+
&& make install \
|
|
62
|
+
&& rm -fr bash* \
|
|
63
|
+
&& true
|
|
64
|
+
|
|
65
|
+
# Buil/install bash-4.3
|
|
66
|
+
RUN cd /root \
|
|
67
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz \
|
|
68
|
+
&& tar -xzf bash-4.3.tar.gz \
|
|
69
|
+
&& cd bash-4.3 \
|
|
70
|
+
&& ./configure --prefix=/bash-4.3 \
|
|
71
|
+
&& make \
|
|
72
|
+
&& make install \
|
|
73
|
+
&& rm -fr bash* \
|
|
74
|
+
&& true
|
|
75
|
+
|
|
76
|
+
# Buil/install bash-4.4
|
|
77
|
+
RUN cd /root \
|
|
78
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz \
|
|
79
|
+
&& tar -xzf bash-4.4.tar.gz \
|
|
80
|
+
&& cd bash-4.4 \
|
|
81
|
+
&& ./configure --prefix=/bash-4.4 \
|
|
82
|
+
&& make \
|
|
83
|
+
&& make install \
|
|
84
|
+
&& rm -fr bash* \
|
|
85
|
+
&& true
|
|
86
|
+
|
|
87
|
+
# Buil/install bash-5.0
|
|
88
|
+
RUN cd /root \
|
|
89
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz \
|
|
90
|
+
&& tar -xzf bash-5.0.tar.gz \
|
|
91
|
+
&& cd bash-5.0 \
|
|
92
|
+
&& ./configure --prefix=/bash-5.0 \
|
|
93
|
+
&& make \
|
|
94
|
+
&& make install \
|
|
95
|
+
&& rm -fr bash* \
|
|
96
|
+
&& true
|
|
97
|
+
|
|
98
|
+
# Buil/install bash-5.1-rc1
|
|
99
|
+
RUN cd /root \
|
|
100
|
+
&& wget https://ftp.gnu.org/gnu/bash/bash-5.1-rc1.tar.gz \
|
|
101
|
+
&& tar -xzf bash-5.1-rc1.tar.gz \
|
|
102
|
+
&& cd bash-5.1-rc1 \
|
|
103
|
+
&& ./configure --prefix=/bash-5.1 \
|
|
104
|
+
&& make \
|
|
105
|
+
&& make install \
|
|
106
|
+
&& rm -fr bash* \
|
|
107
|
+
&& true
|
|
108
|
+
|
|
109
|
+
RUN git config --global user.email "you@example.com" \
|
|
110
|
+
&& git config --global user.name "Your Name" \
|
|
111
|
+
&& git config --global --add safe.directory /git-subrepo/.git \
|
|
112
|
+
&& true
|
|
@@ -11,26 +11,26 @@ note "Test commands work using --all flag"
|
|
|
11
11
|
clone-foo-and-bar
|
|
12
12
|
|
|
13
13
|
(
|
|
14
|
-
cd $OWNER/foo
|
|
15
|
-
git subrepo clone --quiet
|
|
16
|
-
git subrepo clone --quiet
|
|
14
|
+
cd "$OWNER/foo"
|
|
15
|
+
git subrepo clone --quiet "$UPSTREAM/bar" one
|
|
16
|
+
git subrepo clone --quiet "$UPSTREAM/bar" two
|
|
17
17
|
add-new-files two/file
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
ok "$(
|
|
21
|
-
cd $OWNER/foo
|
|
21
|
+
cd "$OWNER/foo"
|
|
22
22
|
git subrepo branch --all &> /dev/null
|
|
23
23
|
)" "branch command works with --all even when a subrepo has no new commits"
|
|
24
24
|
|
|
25
25
|
ok "$(
|
|
26
|
-
cd $OWNER/foo
|
|
26
|
+
cd "$OWNER/foo"
|
|
27
27
|
git:branch-exists subrepo/two
|
|
28
28
|
)" "The 'subrepo/two' branch exists"
|
|
29
29
|
|
|
30
30
|
test-exists "$OWNER/foo/.git/tmp/subrepo/two/"
|
|
31
31
|
|
|
32
32
|
ok "$(
|
|
33
|
-
cd $OWNER/foo
|
|
33
|
+
cd "$OWNER/foo"
|
|
34
34
|
git:branch-exists subrepo/one
|
|
35
35
|
)" "The 'subrepo/one' branch exists"
|
|
36
36
|
|
|
@@ -11,11 +11,11 @@ clone-foo-and-bar
|
|
|
11
11
|
subrepo-clone-bar-into-foo
|
|
12
12
|
|
|
13
13
|
(
|
|
14
|
-
cd $OWNER/foo
|
|
14
|
+
cd "$OWNER/foo"
|
|
15
15
|
branchpoint=$(git rev-parse HEAD)
|
|
16
16
|
add-new-files bar/file1
|
|
17
17
|
add-new-files bar/file2
|
|
18
|
-
git checkout -b other $branchpoint
|
|
18
|
+
git checkout -b other "$branchpoint"
|
|
19
19
|
add-new-files bar/file3
|
|
20
20
|
add-new-files bar/file4
|
|
21
21
|
add-new-files bar/file5
|
|
@@ -25,18 +25,17 @@ subrepo-clone-bar-into-foo
|
|
|
25
25
|
test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3" "$OWNER/foo/bar/file4" "$OWNER/foo/bar/file5"
|
|
26
26
|
|
|
27
27
|
is "$(
|
|
28
|
-
cd $OWNER/foo
|
|
28
|
+
cd "$OWNER/foo"
|
|
29
29
|
git subrepo branch bar
|
|
30
30
|
)" \
|
|
31
31
|
"Created branch 'subrepo/bar' and worktree '.git/tmp/subrepo/bar'." \
|
|
32
32
|
"subrepo branch command output is correct"
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
cd $OWNER/foo
|
|
34
|
+
got="$(
|
|
35
|
+
cd "$OWNER/foo"
|
|
36
36
|
git rev-list subrepo/bar | wc -l
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
"We have only created commits for one of the paths"
|
|
37
|
+
)"
|
|
38
|
+
is "${got// /}" "6" "We have only created commits for one of the paths"
|
|
40
39
|
|
|
41
40
|
done_testing
|
|
42
41
|
|
|
@@ -11,14 +11,14 @@ clone-foo-and-bar
|
|
|
11
11
|
subrepo-clone-bar-into-foo
|
|
12
12
|
|
|
13
13
|
(
|
|
14
|
-
cd $OWNER/foo
|
|
14
|
+
cd "$OWNER/foo"
|
|
15
15
|
branchpoint=$(git rev-parse HEAD)
|
|
16
16
|
add-new-files bar/file1
|
|
17
17
|
# We push here to force subrepo to handle
|
|
18
18
|
# histories where it's not first parent
|
|
19
19
|
git subrepo push bar
|
|
20
20
|
add-new-files bar/file2
|
|
21
|
-
git checkout -b other $branchpoint
|
|
21
|
+
git checkout -b other "$branchpoint"
|
|
22
22
|
add-new-files bar/file3
|
|
23
23
|
add-new-files bar/file4
|
|
24
24
|
add-new-files bar/file5
|
|
@@ -29,18 +29,17 @@ test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3"
|
|
|
29
29
|
|
|
30
30
|
# -F is needed for branch to fetch new information
|
|
31
31
|
is "$(
|
|
32
|
-
cd $OWNER/foo
|
|
32
|
+
cd "$OWNER/foo"
|
|
33
33
|
git subrepo -F branch bar
|
|
34
34
|
)" \
|
|
35
35
|
"Created branch 'subrepo/bar' and worktree '.git/tmp/subrepo/bar'." \
|
|
36
36
|
"subrepo branch command output is correct"
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
cd $OWNER/foo
|
|
38
|
+
got="$(
|
|
39
|
+
cd "$OWNER/foo"
|
|
40
40
|
git rev-list subrepo/bar | wc -l
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
"We have only created commits for one of the paths"
|
|
41
|
+
)"
|
|
42
|
+
is "${got// /}" "5" "We have only created commits for one of the paths"
|
|
44
43
|
|
|
45
44
|
done_testing
|
|
46
45
|
|
|
@@ -10,39 +10,39 @@ clone-foo-and-bar
|
|
|
10
10
|
|
|
11
11
|
subrepo-clone-bar-into-foo
|
|
12
12
|
|
|
13
|
-
before
|
|
13
|
+
before=$(date -r "$OWNER"/foo/Foo '+%s')
|
|
14
14
|
|
|
15
15
|
(
|
|
16
|
-
cd $OWNER/foo
|
|
16
|
+
cd "$OWNER"/foo
|
|
17
17
|
add-new-files bar/file
|
|
18
18
|
add-new-files .gitrepo
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
save-original-state $OWNER/foo bar
|
|
21
|
+
save-original-state "$OWNER"/foo bar
|
|
22
22
|
|
|
23
23
|
# Make sure that time stamps differ
|
|
24
24
|
sleep 1
|
|
25
25
|
|
|
26
26
|
is "$(
|
|
27
|
-
cd $OWNER/foo
|
|
27
|
+
cd "$OWNER"/foo
|
|
28
28
|
git subrepo branch bar
|
|
29
29
|
)" \
|
|
30
30
|
"Created branch 'subrepo/bar' and worktree '.git/tmp/subrepo/bar'." \
|
|
31
31
|
"subrepo branch command output is correct"
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
after
|
|
35
|
-
assert-original-state $OWNER/foo bar
|
|
34
|
+
after=$(date -r "$OWNER"/foo/Foo '+%s')
|
|
35
|
+
assert-original-state "$OWNER"/foo bar
|
|
36
36
|
|
|
37
37
|
# Check that we haven't checked out any temporary files
|
|
38
38
|
is "$before" "$after" \
|
|
39
39
|
"No modification on Foo"
|
|
40
40
|
|
|
41
|
-
test-exists "$OWNER/foo/.git/tmp/subrepo/bar/
|
|
41
|
+
test-exists "$OWNER"/foo/.git/tmp/subrepo/bar/
|
|
42
42
|
|
|
43
43
|
is "$(
|
|
44
|
-
cd $OWNER/foo/.git/tmp/subrepo/bar
|
|
45
|
-
git branch | grep \*
|
|
44
|
+
cd "$OWNER"/foo/.git/tmp/subrepo/bar
|
|
45
|
+
git branch | grep '\*'
|
|
46
46
|
)" \
|
|
47
47
|
"* subrepo/bar" \
|
|
48
48
|
"Correct branch is checked out"
|
|
@@ -11,7 +11,7 @@ clone-foo-and-bar
|
|
|
11
11
|
subrepo-clone-bar-into-foo
|
|
12
12
|
|
|
13
13
|
(
|
|
14
|
-
cd $OWNER/foo
|
|
14
|
+
cd "$OWNER/foo"
|
|
15
15
|
add-new-files bar/file
|
|
16
16
|
git subrepo --quiet branch bar
|
|
17
17
|
)
|
|
@@ -21,7 +21,7 @@ test-exists \
|
|
|
21
21
|
"$OWNER/foo/.git/refs/subrepo/bar/fetch"
|
|
22
22
|
|
|
23
23
|
is "$(
|
|
24
|
-
cd $OWNER/foo
|
|
24
|
+
cd "$OWNER/foo"
|
|
25
25
|
git subrepo clean bar
|
|
26
26
|
)" \
|
|
27
27
|
"Removed branch 'subrepo/bar'." \
|
|
@@ -31,7 +31,7 @@ test-exists \
|
|
|
31
31
|
"!$OWNER/foo/.git/refs/heads/subrepo/bar"
|
|
32
32
|
|
|
33
33
|
(
|
|
34
|
-
cd $OWNER/foo
|
|
34
|
+
cd "$OWNER/foo"
|
|
35
35
|
git subrepo clean --force bar
|
|
36
36
|
)
|
|
37
37
|
|
|
@@ -9,17 +9,17 @@ use Test::More
|
|
|
9
9
|
clone-foo-and-bar
|
|
10
10
|
|
|
11
11
|
(
|
|
12
|
-
cd $OWNER/bar
|
|
12
|
+
cd "$OWNER/bar"
|
|
13
13
|
git tag -a annotated_tag -m "My annotated tag"
|
|
14
14
|
git tag lightweight_tag
|
|
15
15
|
) # >& /dev/null || die
|
|
16
16
|
|
|
17
17
|
# Do the subrepo clone with tag and test the output:
|
|
18
18
|
{
|
|
19
|
-
clone_output
|
|
20
|
-
cd $OWNER/foo
|
|
19
|
+
clone_output=$(
|
|
20
|
+
cd "$OWNER/foo"
|
|
21
21
|
git subrepo clone ../bar/.git -b lightweight_tag light
|
|
22
|
-
)
|
|
22
|
+
)
|
|
23
23
|
|
|
24
24
|
# Check output is correct:
|
|
25
25
|
is "$clone_output" \
|
|
@@ -29,10 +29,10 @@ clone-foo-and-bar
|
|
|
29
29
|
|
|
30
30
|
# Do the subrepo clone with tag and test the output:
|
|
31
31
|
{
|
|
32
|
-
clone_output
|
|
33
|
-
cd $OWNER/foo
|
|
32
|
+
clone_output=$(
|
|
33
|
+
cd "$OWNER/foo"
|
|
34
34
|
git subrepo clone ../bar/.git -b annotated_tag ann 2>&1 || true
|
|
35
|
-
)
|
|
35
|
+
)
|
|
36
36
|
|
|
37
37
|
# Check output is correct:
|
|
38
38
|
is "$clone_output" \
|
|
@@ -26,32 +26,27 @@ clone-foo-and-bar
|
|
|
26
26
|
|
|
27
27
|
# Do the subrepo clone and test the output:
|
|
28
28
|
{
|
|
29
|
-
clone_output
|
|
30
|
-
cd $OWNER/foo
|
|
31
|
-
git subrepo clone
|
|
32
|
-
)
|
|
29
|
+
clone_output=$(
|
|
30
|
+
cd "$OWNER/foo"
|
|
31
|
+
git subrepo clone "$UPSTREAM/bar"
|
|
32
|
+
)
|
|
33
33
|
|
|
34
34
|
# Check output is correct:
|
|
35
35
|
is "$clone_output" \
|
|
36
|
-
"Subrepo '
|
|
36
|
+
"Subrepo '$UPSTREAM/bar' (master) cloned into 'bar'." \
|
|
37
37
|
'subrepo clone command output is correct'
|
|
38
38
|
|
|
39
|
-
remote_output="$(
|
|
40
|
-
cd $OWNER/foo
|
|
41
|
-
git remote -v
|
|
42
|
-
)"
|
|
43
|
-
|
|
44
39
|
is "$(
|
|
45
|
-
cd $OWNER/foo
|
|
40
|
+
cd "$OWNER/foo"
|
|
46
41
|
git remote -v | grep subrepo/bar
|
|
47
42
|
)" \
|
|
48
43
|
"" \
|
|
49
44
|
'No remotes created'
|
|
50
45
|
|
|
51
|
-
clone_output_empty
|
|
52
|
-
cd $OWNER/empty
|
|
53
|
-
catch git subrepo clone
|
|
54
|
-
)
|
|
46
|
+
clone_output_empty=$(
|
|
47
|
+
cd "$OWNER/empty"
|
|
48
|
+
catch git subrepo clone "$UPSTREAM/bar"
|
|
49
|
+
)
|
|
55
50
|
|
|
56
51
|
# Check output is correct:
|
|
57
52
|
is "$clone_output_empty" \
|
|
@@ -71,31 +66,31 @@ gitrepo=$OWNER/foo/bar/.gitrepo
|
|
|
71
66
|
|
|
72
67
|
# Test foo/bar/.gitrepo file contents:
|
|
73
68
|
{
|
|
74
|
-
foo_clone_commit
|
|
75
|
-
bar_head_commit
|
|
69
|
+
foo_clone_commit=$(cd "$OWNER/foo"; git rev-parse HEAD^)
|
|
70
|
+
bar_head_commit=$(cd "$OWNER/bar"; git rev-parse HEAD)
|
|
76
71
|
test-gitrepo-comment-block
|
|
77
|
-
test-gitrepo-field "remote" "
|
|
72
|
+
test-gitrepo-field "remote" "$UPSTREAM/bar"
|
|
78
73
|
test-gitrepo-field "branch" "master"
|
|
79
74
|
test-gitrepo-field "commit" "$bar_head_commit"
|
|
80
75
|
test-gitrepo-field "parent" "$foo_clone_commit"
|
|
81
|
-
test-gitrepo-field "cmdver" "
|
|
76
|
+
test-gitrepo-field "cmdver" "$(git subrepo --version)"
|
|
82
77
|
}
|
|
83
78
|
|
|
84
79
|
# Make sure status is clean:
|
|
85
80
|
{
|
|
86
|
-
git_status
|
|
87
|
-
cd $OWNER/foo
|
|
81
|
+
git_status=$(
|
|
82
|
+
cd "$OWNER/foo"
|
|
88
83
|
git status -s
|
|
89
|
-
)
|
|
84
|
+
)
|
|
90
85
|
|
|
91
86
|
is "$git_status" \
|
|
92
87
|
"" \
|
|
93
88
|
'status is clean'
|
|
94
89
|
|
|
95
|
-
git_status_empty
|
|
96
|
-
cd $OWNER/empty
|
|
90
|
+
git_status_empty=$(
|
|
91
|
+
cd "$OWNER/empty"
|
|
97
92
|
git status -s
|
|
98
|
-
)
|
|
93
|
+
)
|
|
99
94
|
|
|
100
95
|
is "$git_status_empty" \
|
|
101
96
|
"" \
|
|
@@ -6,8 +6,9 @@ source test/setup
|
|
|
6
6
|
|
|
7
7
|
use Test::More
|
|
8
8
|
|
|
9
|
-
git clone $UPSTREAM/init $OWNER/init &>/dev/null
|
|
9
|
+
git clone "$UPSTREAM/init" "$OWNER/init" &>/dev/null
|
|
10
10
|
|
|
11
|
+
# shellcheck disable=2034
|
|
11
12
|
gitrepo=$OWNER/init/doc/.gitrepo
|
|
12
13
|
|
|
13
14
|
(
|
|
@@ -22,11 +23,11 @@ gitrepo=$OWNER/init/doc/.gitrepo
|
|
|
22
23
|
test-gitrepo-field "commit" ""
|
|
23
24
|
test-gitrepo-field "parent" ""
|
|
24
25
|
test-gitrepo-field "method" "merge"
|
|
25
|
-
test-gitrepo-field "cmdver" "
|
|
26
|
+
test-gitrepo-field "cmdver" "$(git subrepo --version)"
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
is "$(
|
|
29
|
-
cd $OWNER/init
|
|
30
|
+
cd "$OWNER/init"
|
|
30
31
|
git subrepo config doc method rebase
|
|
31
32
|
)" \
|
|
32
33
|
"Subrepo 'doc' option 'method' set to 'rebase'."
|
|
@@ -37,17 +38,17 @@ is "$(
|
|
|
37
38
|
test-gitrepo-field "commit" ""
|
|
38
39
|
test-gitrepo-field "parent" ""
|
|
39
40
|
test-gitrepo-field "method" "rebase"
|
|
40
|
-
test-gitrepo-field "cmdver" "
|
|
41
|
+
test-gitrepo-field "cmdver" "$(git subrepo --version)"
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
is "$(
|
|
44
|
-
cd $OWNER/init
|
|
45
|
+
cd "$OWNER/init"
|
|
45
46
|
git subrepo config doc method
|
|
46
47
|
)" \
|
|
47
48
|
"Subrepo 'doc' option 'method' has value 'rebase'."
|
|
48
49
|
|
|
49
50
|
is "$(
|
|
50
|
-
cd $OWNER/init
|
|
51
|
+
cd "$OWNER/init"
|
|
51
52
|
catch git subrepo config doc branch new
|
|
52
53
|
)" \
|
|
53
54
|
"git-subrepo: This option is autogenerated, use '--force' to override."
|
|
@@ -6,31 +6,30 @@ source test/setup
|
|
|
6
6
|
|
|
7
7
|
use Test::More
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
export round=0
|
|
11
10
|
test_round() {
|
|
12
11
|
clone-foo-and-bar
|
|
13
12
|
|
|
14
13
|
round=$(( round + 1 ))
|
|
15
|
-
normalize_dir
|
|
16
|
-
normalize_dir
|
|
17
|
-
normalize_dir
|
|
14
|
+
normalize_dir=$1
|
|
15
|
+
normalize_dir=${normalize_dir#./}
|
|
16
|
+
normalize_dir=${normalize_dir%/}
|
|
18
17
|
while [[ $normalize_dir =~ (//+) ]]; do normalize_dir=${normalize_dir//${BASH_REMATCH[1]}/\/}; done
|
|
19
18
|
|
|
20
|
-
clone_output
|
|
21
|
-
cd $OWNER/foo
|
|
22
|
-
git subrepo clone
|
|
23
|
-
)
|
|
19
|
+
clone_output=$(
|
|
20
|
+
cd "$OWNER/foo"
|
|
21
|
+
git subrepo clone "$UPSTREAM/bar" -- "$normalize_dir"
|
|
22
|
+
)
|
|
24
23
|
|
|
25
24
|
# Check output is correct:
|
|
26
25
|
is "$clone_output" \
|
|
27
|
-
"Subrepo '
|
|
26
|
+
"Subrepo '$UPSTREAM/bar' (master) cloned into '$normalize_dir'." \
|
|
28
27
|
'subrepo clone command output is correct'
|
|
29
28
|
|
|
30
29
|
test-exists "$OWNER/foo/$normalize_dir/"
|
|
31
30
|
|
|
32
31
|
(
|
|
33
|
-
cd $OWNER/bar
|
|
32
|
+
cd "$OWNER/bar"
|
|
34
33
|
git pull
|
|
35
34
|
add-new-files Bar2-$round
|
|
36
35
|
git push
|
|
@@ -39,10 +38,10 @@ test_round() {
|
|
|
39
38
|
# Do the pull and check output:
|
|
40
39
|
{
|
|
41
40
|
is "$(
|
|
42
|
-
cd $OWNER/foo
|
|
41
|
+
cd "$OWNER/foo"
|
|
43
42
|
git subrepo pull -- "$normalize_dir"
|
|
44
43
|
)" \
|
|
45
|
-
"Subrepo '$normalize_dir' pulled from '
|
|
44
|
+
"Subrepo '$normalize_dir' pulled from '$UPSTREAM/bar' (master)." \
|
|
46
45
|
'subrepo pull command output is correct'
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -58,10 +57,10 @@ test_round() {
|
|
|
58
57
|
# Do the push and check output:
|
|
59
58
|
{
|
|
60
59
|
is "$(
|
|
61
|
-
cd $OWNER/foo
|
|
60
|
+
cd "$OWNER/foo"
|
|
62
61
|
git subrepo push -- "$normalize_dir"
|
|
63
62
|
)" \
|
|
64
|
-
"Subrepo '$normalize_dir' pushed to '
|
|
63
|
+
"Subrepo '$normalize_dir' pushed to '$UPSTREAM/bar' (master)." \
|
|
65
64
|
'subrepo push command output is correct'
|
|
66
65
|
}
|
|
67
66
|
}
|
|
@@ -71,9 +70,9 @@ test_round .dot
|
|
|
71
70
|
test_round ......dots
|
|
72
71
|
test_round 'spa ce'
|
|
73
72
|
test_round 'per%cent'
|
|
74
|
-
test_round 'back-sl\
|
|
73
|
+
test_round 'back-sl\as/h'
|
|
75
74
|
test_round 'end-with.lock'
|
|
76
|
-
test_round '@'
|
|
75
|
+
# test_round '@' # TODO Fix. This broke on recent git version...
|
|
77
76
|
test_round '@{'
|
|
78
77
|
test_round '['
|
|
79
78
|
test_round '-begin-with-minus'
|
|
@@ -84,7 +83,8 @@ test_round 'many////slashes'
|
|
|
84
83
|
test_round '_under_scores_'
|
|
85
84
|
|
|
86
85
|
test_round '.str%a\nge...'
|
|
87
|
-
test_round '
|
|
86
|
+
test_round ~'////......s:a^t?r a*n[g@{e.lock'
|
|
87
|
+
|
|
88
88
|
|
|
89
89
|
done_testing
|
|
90
90
|
|