From c31d9f1126dd87fefc5d36673a03ddfa753bf2b4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 14 May 2017 14:26:09 -0300 Subject: Auto fetch changes on commit, fix staging check --- commit | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commit') diff --git a/commit b/commit index ccf03f6..e7026b6 100755 --- a/commit +++ b/commit @@ -131,6 +131,8 @@ function git_commit { # If there are no staged files, commit everything. # Otherwise commit just what was staged if git status --short | grep -q "^[AM]"; then + flag="" + else flag="-a" fi @@ -148,5 +150,6 @@ if [ ! -z "$1" ]; then git_user git_commit $* git_push + git fetch --all fi fi -- cgit v1.2.3