Skip to content
Snippets Groups Projects
Commit 273818ae authored by Roland Hopferwieser's avatar Roland Hopferwieser
Browse files

Merge remote-tracking branch 'upstream/master'

parents b3b209a9 c5b8fc49
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
......@@ -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`;
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment