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
375f7dce
Commit
375f7dce
authored
13 years ago
by
Richard Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
Quit vcsh if repo can not be found
parent
e01cd008
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
vcsh
+6
-6
6 additions, 6 deletions
vcsh
with
6 additions
and
6 deletions
vcsh
+
6
−
6
View file @
375f7dce
...
...
@@ -54,7 +54,7 @@ use() {
if
[
!
-d
"
$GIT_DIR
"
]
;
then
echo
E: no repository found
for
"
$REPO_NAME
"
>
&2
return
2
return
1
fi
export
GIT_DIR
...
...
@@ -103,7 +103,7 @@ elif [ "$1" = 'list' ]; then
elif
[
"
$1
"
=
'run'
]
;
then
verbose
"run begin"
use
"
$2
"
use
"
$2
"
||
return
1
shift
2
"
$@
"
leave
...
...
@@ -124,7 +124,7 @@ elif [ "$1" = 'run' ]; then
# zle -N vcsh_exit
# bindkey '^d' 'vcsh_exit'
# fi
# use $2
# use
"
$2
" || return 1
# [ -n "$ZSH_VERSION" ] && [ "$USER" = richih ] && buildPS1
# verbose "use end"
# exit 0
...
...
@@ -153,7 +153,7 @@ elif [ "$1" = 'clone' ]; then
echo
" Once this situation has been resolved, run 'vcsh run <foo> git pull' to finish cloning.
\n
"
&&
exit
3
git merge origin/master
#
vcsh
use $REPO_NAME
# use $REPO_NAME
|| return 1
verbose
"clone end"
elif
[
"
$1
"
=
'init'
]
;
then
...
...
@@ -162,7 +162,7 @@ elif [ "$1" = 'init' ]; then
export
REPO_NAME
=
"
$2
"
export
GIT_DIR
=
"
$VCSH_BASE
/
$REPO_NAME
.git"
init
#
vcsh
use "$REPO_NAME"
# use "$REPO_NAME"
|| return 1
verbose
"init end"
#elif [ "$1" = 'exit' ]; then
...
...
@@ -179,7 +179,7 @@ elif [ "$1" = 'init' ]; then
elif
[
"
$1
"
=
'seed-gitignore'
]
;
then
verbose
"seed-gitignore begin"
[
-z
$2
]
&&
help
&&
echo
&&
echo
"
$SELF
$1
: error: please specify repository to work on"
&&
return
0
use
"
$2
"
use
$2
||
return
1
# Switching directory as this has to be executed from $HOME to be of any use.
# Going back into old directory at the end in case `vcsh use` is reactivated.
old_dir
=
"
$PWD
"
...
...
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