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
273818ae
Commit
273818ae
authored
7 years ago
by
Roland Hopferwieser
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'upstream/master'
parents
b3b209a9
c5b8fc49
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
_vcsh
+4
-1
4 additions, 1 deletion
_vcsh
t/100-init.t
+1
-1
1 addition, 1 deletion
t/100-init.t
vcsh
+4
-1
4 additions, 1 deletion
vcsh
with
9 additions
and
3 deletions
_vcsh
+
4
−
1
View file @
273818ae
...
...
@@ -95,6 +95,9 @@ function _vcsh () {
local
state vcshcommand
local
-a
args subcommands
local
VCSH_REPO_D
:
${
VCSH_REPO_D
:
=
"
${
XDG_CONFIG_HOME
:-
"
$HOME
/.config"
}
/vcsh/repo.d"
}
subcommands
=(
"clone:clone an existing repository"
"commit:commit in all repositories"
...
...
@@ -135,7 +138,7 @@ function _vcsh () {
if
!
((
${
+functions[_vcsh-
$vcshcommand
]
}
))
;
then
# There is no handler function, so this is probably the name
# of a repository. Act accordingly.
_dispatch git git
GIT_DIR
=
$VCSH_REPO_D
/
$words
[
1].git
_dispatch git git
else
curcontext
=
"
${
curcontext
%
:
*
:
*
}
:vcsh-
${
vcshcommand
}
:"
_call_function ret _vcsh-
${
vcshcommand
}
...
...
This diff is collapsed.
Click to expand it.
t/100-init.t
+
1
−
1
View file @
273818ae
...
...
@@ -18,7 +18,7 @@ ok $output eq "", 'No repos set up yet.';
$output
=
`
./vcsh init test1
`;
ok
$output
eq
"
Initialized empty
shared
Git repository in
"
.
$ENV
{'
HOME
'}
.
"
/.config/vcsh/repo.d/test1.git/
\n
";
ok
$output
eq
"
Initialized empty Git repository in
"
.
$ENV
{'
HOME
'}
.
"
/.config/vcsh/repo.d/test1.git/
\n
";
$output
=
`
./vcsh status
`;
...
...
This diff is collapsed.
Click to expand it.
vcsh
+
4
−
1
View file @
273818ae
...
...
@@ -22,6 +22,9 @@
VERSION
=
'1.20141026'
SELF
=
$(
basename
$0
)
# Ensure all files created are accessible only to the current user.
umask
0077
fatal
()
{
echo
"
$SELF
: fatal:
$1
"
>
&2
[
-z
$2
]
&&
exit
1
...
...
@@ -263,7 +266,7 @@ init() {
[
!
-e
"
$GIT_DIR
"
]
||
fatal
"'
$GIT_DIR
' exists"
10
mkdir
-p
"
$VCSH_BASE
"
||
fatal
"could not create '
$VCSH_BASE
'"
50
cd
"
$VCSH_BASE
"
||
fatal
"could not enter '
$VCSH_BASE
'"
11
git init
--shared
=
0600
git init
--shared
=
false
upgrade
hook post-init
}
...
...
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