]> git.madduck.net Git - code/vcsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Rename `vcsh setup` to `vcsh upgrade`
authorRichard Hartmann <richih.mailinglist@gmail.com>
Tue, 7 May 2013 22:25:45 +0000 (00:25 +0200)
committerRichard Hartmann <richih.mailinglist@gmail.com>
Tue, 7 May 2013 22:25:45 +0000 (00:25 +0200)
_vcsh
doc/hooks
doc/vcsh.1.ronn
vcsh

diff --git a/_vcsh b/_vcsh
index 26ee9b9e55e74c146b615b4809133042409dd1f3..2367fb44c9f513741ae9776fc62f3c3e0bf952e2 100644 (file)
--- a/_vcsh
+++ b/_vcsh
@@ -58,7 +58,7 @@ function _vcsh-run () {
        fi
 }
 
-function _vcsh-setup () {
+function _vcsh-upgrade () {
        (( CURRENT == 2 )) && __vcsh_repositories
 }
 
@@ -90,7 +90,7 @@ function _vcsh () {
                "list-tracked-by:list files tracked by a repository"
                "rename:rename a repository"
                "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"
                "which:find <substring> in name of any tracked file"
                "write-gitignore:write .gitignore.d/<repo> via git ls-files"
index 036e2dc6a28ca6e76e4a4a504b8a224abee7a21f..5547131cddc8c625e095bf13789833ac403a7fd6 100644 (file)
--- a/doc/hooks
+++ b/doc/hooks
@@ -5,5 +5,5 @@ pre-enter
 post-enter
 pre-run
 post-run
-pre-setup
-post-setup
+pre-upgrade
+post-upgrade
index e12cf1599c175ee5c8c3be9b12a845a5e28a70e8..4ec9548cf344b7238006941092e04564ca8a2b1c 100644 (file)
@@ -25,7 +25,7 @@ vcsh(1) - manage config files in $HOME via fake bare git repositories
 
 `vcsh` run <repo> <shell command>
 
-`vcsh` setup <repo>
+`vcsh` upgrade <repo>
 
 `vcsh` version
 
@@ -112,8 +112,8 @@ an interactive user.
   This is needed to support mr and other scripts properly and of no concern to
   an interactive user.
 
-* setup:
-  Set up repository with recommended settings.
+* upgrade:
+  Upgrade repository to currently recommended settings.
 
 * version:
   Print version information.
@@ -207,7 +207,7 @@ same rules as above apply. The dot between the repository's name and the hook
 is mandatory, though.
 
 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.
 
 ## DETAILED HOWTO AND FURTHER READING
diff --git a/vcsh b/vcsh
index d742cf44cae8c27aeeaa1c796954e0b26bb1a437..cf85e7c1a47ccb00dcba5898d83386bd860fc437 100755 (executable)
--- a/vcsh
+++ b/vcsh
@@ -99,7 +99,7 @@ help() {
           <newname>     Rename repository
    run <repo> \\
        <command>        Use this repository
-   setup <repo>         Set up repository with recommended settings
+   upgrade <repo>       Upgrade repository to currently recommended settings
    version              Print version information
    which <substring>    Find substring in name of any tracked file
    write-gitignore \\
@@ -190,7 +190,7 @@ init() {
        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
        git init
-       setup
+       upgrade
 }
 
 list() {
@@ -229,14 +229,14 @@ run() {
        hook post-run
 }
 
-setup() {
-       hook pre-setup
+upgrade() {
+       hook pre-upgrade
        use
        git config core.worktree     "$GIT_WORK_TREE"
        git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME"
        git config vcsh.vcsh         'true'
        [ -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() {
@@ -309,7 +309,7 @@ elif [ "$1" = 'delete' ]           ||
      [ "$1" = 'list-tracked-by' ]  ||
      [ "$1" = 'rename' ]           ||
      [ "$1" = 'run' ]              ||
-     [ "$1" = 'setup' ]            ||
+     [ "$1" = 'upgrade' ]          ||
      [ "$1" = 'write-gitignore' ]; then
        [ -z $2 ]                      && fatal "$1: please specify repository to work on" 1
        [ "$1" = 'rename' -a -z "$3" ] && fatal "$1: please specify a target name" 1