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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
11c5bff1
Commit
11c5bff1
authored
May 7, 2013
by
Richard Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
Rename `vcsh setup` to `vcsh upgrade`
parent
ae015404
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
_vcsh
+2
-2
2 additions, 2 deletions
_vcsh
doc/hooks
+2
-2
2 additions, 2 deletions
doc/hooks
doc/vcsh.1.ronn
+4
-4
4 additions, 4 deletions
doc/vcsh.1.ronn
vcsh
+6
-6
6 additions, 6 deletions
vcsh
with
14 additions
and
14 deletions
_vcsh
+
2
−
2
View file @
11c5bff1
...
@@ -58,7 +58,7 @@ function _vcsh-run () {
...
@@ -58,7 +58,7 @@ function _vcsh-run () {
fi
fi
}
}
function
_vcsh-
setup
()
{
function
_vcsh-
upgrade
()
{
((
CURRENT
==
2
))
&&
__vcsh_repositories
((
CURRENT
==
2
))
&&
__vcsh_repositories
}
}
...
@@ -90,7 +90,7 @@ function _vcsh () {
...
@@ -90,7 +90,7 @@ function _vcsh () {
"list-tracked-by:list files tracked by a repository"
"list-tracked-by:list files tracked by a repository"
"rename:rename a repository"
"rename:rename a repository"
"run:run command with <
\$
GIT_DIR> and <
\$
GIT_WORK_TREE> set"
"run:run command with <
\$
GIT_DIR> and <
\$
GIT_WORK_TREE> set"
"
setup:set up repository with
recommended settings"
"
upgrade:upgrade repository to currently
recommended settings"
"version:print version information"
"version:print version information"
"which:find <substring> in name of any tracked file"
"which:find <substring> in name of any tracked file"
"write-gitignore:write .gitignore.d/<repo> via git ls-files"
"write-gitignore:write .gitignore.d/<repo> via git ls-files"
...
...
This diff is collapsed.
Click to expand it.
doc/hooks
+
2
−
2
View file @
11c5bff1
...
@@ -5,5 +5,5 @@ pre-enter
...
@@ -5,5 +5,5 @@ pre-enter
post-enter
post-enter
pre-run
pre-run
post-run
post-run
pre-
setup
pre-
upgrade
post-
setup
post-
upgrade
This diff is collapsed.
Click to expand it.
doc/vcsh.1.ronn
+
4
−
4
View file @
11c5bff1
...
@@ -25,7 +25,7 @@ vcsh(1) - manage config files in $HOME via fake bare git repositories
...
@@ -25,7 +25,7 @@ vcsh(1) - manage config files in $HOME via fake bare git repositories
`vcsh` run <repo> <shell command>
`vcsh` run <repo> <shell command>
`vcsh`
setup
<repo>
`vcsh`
upgrade
<repo>
`vcsh` version
`vcsh` version
...
@@ -112,8 +112,8 @@ an interactive user.
...
@@ -112,8 +112,8 @@ an interactive user.
This is needed to support mr and other scripts properly and of no concern to
This is needed to support mr and other scripts properly and of no concern to
an interactive user.
an interactive user.
*
setup
:
*
upgrade
:
Set up
repository
with
recommended settings.
Upgrade
repository
to currently
recommended settings.
* version:
* version:
Print version information.
Print version information.
...
@@ -207,7 +207,7 @@ same rules as above apply. The dot between the repository's name and the hook
...
@@ -207,7 +207,7 @@ same rules as above apply. The dot between the repository's name and the hook
is mandatory, though.
is mandatory, though.
Available hooks are <pre-enter>, <post-enter>, <pre-run>, <post-run>,
Available hooks are <pre-enter>, <post-enter>, <pre-run>, <post-run>,
<pre-
setup
>, and <post-
setup
>. If you need more, vcsh is trivial to patch,
<pre-
upgrade
>, and <post-
upgrade
>. If you need more, vcsh is trivial to patch,
but please let upstream know so we can ship them by default.
but please let upstream know so we can ship them by default.
## DETAILED HOWTO AND FURTHER READING
## DETAILED HOWTO AND FURTHER READING
...
...
This diff is collapsed.
Click to expand it.
vcsh
+
6
−
6
View file @
11c5bff1
...
@@ -99,7 +99,7 @@ help() {
...
@@ -99,7 +99,7 @@ help() {
<newname> Rename repository
<newname> Rename repository
run <repo>
\\
run <repo>
\\
<command> Use this repository
<command> Use this repository
setup
<repo>
Set up
repository
with
recommended settings
upgrade
<repo>
Upgrade
repository
to currently
recommended settings
version Print version information
version Print version information
which <substring> Find substring in name of any tracked file
which <substring> Find substring in name of any tracked file
write-gitignore
\\
write-gitignore
\\
...
@@ -190,7 +190,7 @@ init() {
...
@@ -190,7 +190,7 @@ init() {
mkdir
-p
"
$GIT_WORK_TREE
"
||
fatal
"could not create '
$GIT_WORK_TREE
'"
50
mkdir
-p
"
$GIT_WORK_TREE
"
||
fatal
"could not create '
$GIT_WORK_TREE
'"
50
cd
"
$GIT_WORK_TREE
"
||
fatal
"could not enter '
$GIT_WORK_TREE
'"
11
cd
"
$GIT_WORK_TREE
"
||
fatal
"could not enter '
$GIT_WORK_TREE
'"
11
git init
git init
setup
upgrade
}
}
list
()
{
list
()
{
...
@@ -229,14 +229,14 @@ run() {
...
@@ -229,14 +229,14 @@ run() {
hook post-run
hook post-run
}
}
setup
()
{
upgrade
()
{
hook pre-
setup
hook pre-
upgrade
use
use
git config core.worktree
"
$GIT_WORK_TREE
"
git config core.worktree
"
$GIT_WORK_TREE
"
git config core.excludesfile
".gitignore.d/
$VCSH_REPO_NAME
"
git config core.excludesfile
".gitignore.d/
$VCSH_REPO_NAME
"
git config vcsh.vcsh
'true'
git config vcsh.vcsh
'true'
[
-e
"
$VCSH_BASE
/.gitignore.d/
$VCSH_REPO_NAME
"
]
&&
git add
-f
"
$VCSH_BASE
/.gitignore.d/
$VCSH_REPO_NAME
"
[
-e
"
$VCSH_BASE
/.gitignore.d/
$VCSH_REPO_NAME
"
]
&&
git add
-f
"
$VCSH_BASE
/.gitignore.d/
$VCSH_REPO_NAME
"
hook post-
setup
hook post-
upgrade
}
}
use
()
{
use
()
{
...
@@ -309,7 +309,7 @@ elif [ "$1" = 'delete' ] ||
...
@@ -309,7 +309,7 @@ elif [ "$1" = 'delete' ] ||
[
"
$1
"
=
'list-tracked-by'
]
||
[
"
$1
"
=
'list-tracked-by'
]
||
[
"
$1
"
=
'rename'
]
||
[
"
$1
"
=
'rename'
]
||
[
"
$1
"
=
'run'
]
||
[
"
$1
"
=
'run'
]
||
[
"
$1
"
=
'
setup
'
]
||
[
"
$1
"
=
'
upgrade
'
]
||
[
"
$1
"
=
'write-gitignore'
]
;
then
[
"
$1
"
=
'write-gitignore'
]
;
then
[
-z
$2
]
&&
fatal
"
$1
: please specify repository to work on"
1
[
-z
$2
]
&&
fatal
"
$1
: please specify repository to work on"
1
[
"
$1
"
=
'rename'
-a
-z
"
$3
"
]
&&
fatal
"
$1
: please specify a target name"
1
[
"
$1
"
=
'rename'
-a
-z
"
$3
"
]
&&
fatal
"
$1
: please specify a target name"
1
...
...
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