Skip to content
Snippets Groups Projects
Commit c2802e6b authored by Richard Hartmann's avatar Richard Hartmann
Browse files

vcsh: Default to not using ~/.gitattributes.d

github: fixes richih/vcsh#111
parent 3c2288b6
No related branches found
No related tags found
No related merge requests found
...@@ -77,6 +77,7 @@ fi ...@@ -77,6 +77,7 @@ fi
: ${VCSH_HOOK_D:=$XDH_CONFIG_HOME/vcsh/hooks-enabled} : ${VCSH_HOOK_D:=$XDH_CONFIG_HOME/vcsh/hooks-enabled}
: ${VCSH_BASE:=$HOME} : ${VCSH_BASE:=$HOME}
: ${VCSH_GITIGNORE:=exact} : ${VCSH_GITIGNORE:=exact}
: ${VCSH_GITATTRIBUTES:=none}
: ${VCSH_WORKTREE:=absolute} : ${VCSH_WORKTREE:=absolute}
if [ ! "x$VCSH_GITIGNORE" = 'xexact' ] && [ ! "x$VCSH_GITIGNORE" = 'xnone' ] && [ ! "x$VCSH_GITIGNORE" = 'xrecursive' ]; then if [ ! "x$VCSH_GITIGNORE" = 'xexact' ] && [ ! "x$VCSH_GITIGNORE" = 'xnone' ] && [ ! "x$VCSH_GITIGNORE" = 'xrecursive' ]; then
...@@ -334,7 +335,7 @@ upgrade() { ...@@ -334,7 +335,7 @@ upgrade() {
git config core.worktree "$VCSH_BASE" git config core.worktree "$VCSH_BASE"
fi fi
[ ! "x$VCSH_GITIGNORE" = 'xnone' ] && git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME" [ ! "x$VCSH_GITIGNORE" = 'xnone' ] && git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME"
git config core.attributesfile ".gitattributes.d/$VCSH_REPO_NAME" [ ! "x$VCSH_GITATTRIBUTES" = 'xnone' ] && git config core.attributesfile ".gitattributes.d/$VCSH_REPO_NAME"
git config vcsh.vcsh 'true' git config vcsh.vcsh 'true'
use use
[ -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"
...@@ -500,7 +501,7 @@ check_dir() { ...@@ -500,7 +501,7 @@ check_dir() {
check_dir "$VCSH_REPO_D" check_dir "$VCSH_REPO_D"
[ ! "x$VCSH_GITIGNORE" = 'xnone' ] && check_dir "$VCSH_BASE/.gitignore.d" [ ! "x$VCSH_GITIGNORE" = 'xnone' ] && check_dir "$VCSH_BASE/.gitignore.d"
check_dir "$VCSH_BASE/.gitattributes.d" [ ! "x$VCSH_GITATTRIBUTES" = 'xnone' ] && check_dir "$VCSH_BASE/.gitattributes.d"
verbose "$VCSH_COMMAND begin" verbose "$VCSH_COMMAND begin"
export VCSH_COMMAND=$(echo $VCSH_COMMAND | sed 's/-/_/g') export VCSH_COMMAND=$(echo $VCSH_COMMAND | sed 's/-/_/g')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment