Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
6f91211d
Commit
6f91211d
authored
13 years ago
by
Richard Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
Make `vcsh clone` handle empty remotes gracefully
parent
8260b8ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
TODO
+0
-2
0 additions, 2 deletions
TODO
vcsh
+4
-0
4 additions, 0 deletions
vcsh
with
4 additions
and
2 deletions
TODO
+
0
−
2
View file @
6f91211d
* vcsh clone fails when remote is empty
# Related #
* Package for Debian
...
...
This diff is collapsed.
Click to expand it.
vcsh
+
4
−
0
View file @
6f91211d
...
...
@@ -64,6 +64,10 @@ clone() {
git remote add origin
"
$GIT_REMOTE
"
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
if
[
-z
$(
git ls-remote 2> /dev/null
)
]
;
then
info
"remote is empty, not merging anything"
exit
fi
git fetch
for
object
in
$(
git ls-tree
-r
origin/master |
awk
'{print $4}'
)
;
do
[
-e
"
$object
"
]
&&
...
...
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