# Check user information
function git_user {
if ! grep -q "^\[user\]" $GIT_FOLDER/.git/config; then
- # TODO: remove '--config' from args, otherwise it goes to the commit log
if echo $ARGS | grep -q -- '--config'; then
grep -A 2 "^\[user\]" $HOME/.gitconfig >> $GIT_FOLDER/.git/config
else
fi
}
+# Commit changes
+function git_commit {
+ # Remove '--config' from args, otherwise it goes to the commit log
+ params="echo $* | sed -e 's/--commit//'"
+ git commit -a -m "$params"
+}
+
# Main
if [ ! -z "$1" ]; then
if is_svn .; then
if is_git .; then
git_folder $(pwd)
git_user
- git commit -a -m "$*"
+ git_commit $*
git_push
fi
fi