]> 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:

Merge branch 'feature/chown'
authorRichard Hartmann <richih@debian.org>
Thu, 13 Feb 2014 22:40:28 +0000 (23:40 +0100)
committerRichard Hartmann <richih@debian.org>
Thu, 13 Feb 2014 22:40:28 +0000 (23:40 +0100)
1  2 
vcsh

diff --combined vcsh
index 068c61817dc5a08e371e0802fecb028730352cf2,993c8ed3443cfd1300687a9f705540e63ed9199c..577d235ee94404fa15b8fc71fe9c7ab6c911c26d
--- 1/vcsh
--- 2/vcsh
+++ b/vcsh
@@@ -152,17 -152,15 +152,17 @@@ clone() 
                exit
        fi
        git fetch
 -      for object in $(git ls-tree -r origin/master | awk '{print $4}'); do
 +      hook pre-merge
 +      git ls-tree -r --name-only origin/master | (while read object; do
                [ -e "$object" ] &&
                        error "'$object' exists." &&
                        VCSH_CONFLICT=1
        done
 -      [ "$VCSH_CONFLICT" = '1' ] &&
 +      [ "$VCSH_CONFLICT" = '1' ]) &&
                fatal "will stop after fetching and not try to merge!
    Once this situation has been resolved, run 'vcsh run $VCSH_REPO_NAME git pull' to finish cloning." 17
        git merge origin/master
 +      hook post-merge
        hook post-clone
        retire
        hook post-clone-retired
@@@ -175,7 -173,6 +175,7 @@@ commit() 
                export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
                use
                git commit --untracked-files=no --quiet
 +              VCSH_COMMAND_RETURN_CODE=$?
                echo
        done
        hook post-commit
@@@ -224,7 -221,7 +224,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
+       git init --shared=0600
        upgrade
        hook post-init
  }
@@@ -258,7 -255,6 +258,7 @@@ pull() 
                export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
                use
                git pull
 +              VCSH_COMMAND_RETURN_CODE=$?
                echo
        done
        hook post-pull
@@@ -271,7 -267,6 +271,7 @@@ push() 
                export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
                use
                git push
 +              VCSH_COMMAND_RETURN_CODE=$?
                echo
        done
        hook post-push
@@@ -298,7 -293,6 +298,7 @@@ run() 
        hook pre-run
        use
        "$@"
 +      VCSH_COMMAND_RETURN_CODE=$?
        hook post-run
  }
  
@@@ -307,14 -301,12 +307,14 @@@ status() 
                export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
                use
                git status --short --untracked-files='no'
 +              VCSH_COMMAND_RETURN_CODE=$?
        else
                for VCSH_REPO_NAME in $(list); do
                        echo "$VCSH_REPO_NAME:"
                        export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
                        use
                        git status --short --untracked-files='no'
 +                      VCSH_COMMAND_RETURN_CODE=$?
                        echo
                done
        fi
@@@ -424,7 -416,7 +424,7 @@@ esa
  if [ "$VCSH_COMMAND" = 'clone' ]; then
        [ -z "$2" ] && fatal "$VCSH_COMMAND: please specify a remote" 1
        GIT_REMOTE="$2"
 -      [ -n "$3" ] && VCSH_REPO_NAME="$3" || VCSH_REPO_NAME=$(basename "$GIT_REMOTE" .git)
 +      [ -n "$3" ] && VCSH_REPO_NAME="$3" || VCSH_REPO_NAME=$(basename "${GIT_REMOTE#*:}" .git)
        [ -z "$VCSH_REPO_NAME" ] && fatal "$VCSH_COMMAND: could not determine repository name" 1
        export VCSH_REPO_NAME
        export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
@@@ -505,4 -497,3 +505,4 @@@ hook pre-comman
  $VCSH_COMMAND "$@"
  hook post-command
  verbose "$VCSH_COMMAND end, exiting"
 +exit $VCSH_COMMAND_RETURN_CODE