]> gitweb.fluxo.info Git - scripts.git/commitdiff
Minor changes at GIT_FOLDER
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 15 Jan 2013 18:54:07 +0000 (16:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 15 Jan 2013 18:54:07 +0000 (16:54 -0200)
commit

diff --git a/commit b/commit
index bc226f00fa41bf688af9c0f798836f0ef3bee76e..03e9a8a56ed9317c02714cdd239bcaf2363c4b62 100755 (executable)
--- 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