aboutsummaryrefslogtreecommitdiff
path: root/commit
diff options
context:
space:
mode:
Diffstat (limited to 'commit')
-rwxr-xr-xcommit6
1 files changed, 5 insertions, 1 deletions
diff --git a/commit b/commit
index bc226f0..03e9a8a 100755
--- a/commit
+++ b/commit
@@ -89,7 +89,11 @@ function git_user {
if [ -e "$HOME/.gitconfig" ]; then
echo "You should try to use your default setting:"
- echo "cat <<EOF >> $GIT_FOLDER/.git/config"
+ if [ "$GIT_FOLDER" == "$(pwd)" ]; then
+ echo "cat <<EOF >> .git/config"
+ else
+ echo "cat <<EOF >> $GIT_FOLDER/.git/config"
+ fi
grep -A 2 "^\[user\]" $HOME/.gitconfig
echo "EOF"
fi