~wrm/dotfiles

a0ffa32033a78be81dc530fbccf9811c5c9bd179 — +wrm 3 months ago df04ceb
Exit git-choose-config immediately if no .git
1 files changed, 1 insertions(+), 1 deletions(-)

M .local/bin/git-choose-config
M .local/bin/git-choose-config => .local/bin/git-choose-config +1 -1
@@ 8,7 8,7 @@ if [ $# -ne 1 ]; then
	exit 1
fi

[ ! -d ./.git ] && echo "Not in a git repository"
[ ! -d ./.git ] && echo "Not in a git repository" && exit 1

config_file="$HOME/.config/git/$1"
[ -f "$config_file" ] && cat "$config_file" >> ./.git/config || echo "invalid config file"