Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
git-clone-fail-demo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
git-clone-fail-demo
Commits
220398e8
Commit
220398e8
authored
13 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Added --use-ssh option to the setup script.
parent
5dcf2043
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
stdout.master.3.txt
+1
-0
1 addition, 0 deletions
stdout.master.3.txt
stdout.mirror.3.txt
+1
-0
1 addition, 0 deletions
stdout.mirror.3.txt
test-git-reclone.sh
+10
-1
10 additions, 1 deletion
test-git-reclone.sh
test-git-setup.sh
+11
-2
11 additions, 2 deletions
test-git-setup.sh
with
23 additions
and
3 deletions
stdout.master.3.txt
0 → 100644
+
1
−
0
View file @
220398e8
Cloning into 'master-clone'...
This diff is collapsed.
Click to expand it.
stdout.mirror.3.txt
0 → 100644
+
1
−
0
View file @
220398e8
Cloning into 'mirror-clone'...
This diff is collapsed.
Click to expand it.
test-git-reclone.sh
+
10
−
1
View file @
220398e8
...
@@ -12,9 +12,18 @@ esac
...
@@ -12,9 +12,18 @@ esac
good
=
0
good
=
0
cd
test-git
||
exit
1
cd
test-git
||
exit
1
rm
-rf
$what
-clone
rm
-rf
$what
-clone
if
[
-f
use_ssh
]
then
use_ssh
=
ssh://localhost/
`
pwd
`
/
else
use_ssh
=
fi
while
:
while
:
do
do
git clone
$what
.git
$what
-clone
>
$what
.out 2>
$what
.err
||
exit
1
git clone
${
use_ssh
}
$what
.git
$what
-clone
>
$what
.out 2>
$what
.err
||
exit
1
if
[
-s
$what
.err
]
if
[
-s
$what
.err
]
then
then
echo
unexpected stderr from git clone:
echo
unexpected stderr from git clone:
...
...
This diff is collapsed.
Click to expand it.
test-git-setup.sh
+
11
−
2
View file @
220398e8
#!/bin/sh
#!/bin/sh
mkdir
test-git
||
exit
1
mkdir
test-git
||
exit
1
cd
test-git
cd
test-git
if
[
x
"
$1
"
=
x
"--use-ssh"
]
then
touch
use_ssh
use_ssh
=
ssh://localhost/
`
pwd
`
/
else
use_ssh
=
fi
mkdir
master.git
mkdir
master.git
(
cd
master.git
&&
git init
--bare
)
(
cd
master.git
&&
git init
--bare
)
git clone master.git committer
git clone
${
use_ssh
}
master.git committer
(
cd
committer
&&
(
cd
committer
&&
touch
foo
&&
touch
foo
&&
git add foo
&&
git add foo
&&
git commit
-m
"Initial commit"
&&
git commit
-m
"Initial commit"
&&
git push origin master
)
git push origin master
)
git clone
--mirror
master.git mirror.git
git clone
--mirror
${
use_ssh
}
master.git mirror.git
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment