diff options
-rwxr-xr-x | git-hooks/post-merge | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/git-hooks/post-merge b/git-hooks/post-merge index 9618b5e31..02583897f 100755 --- a/git-hooks/post-merge +++ b/git-hooks/post-merge @@ -6,10 +6,13 @@ fi cd "$GIT_DIR/.." -changes=$(git diff --name-only @{1}) +changes=$(git diff --name-only @{1} 2> /dev/null) +fresh_clone=$? # Exit if nothing has changed -[[ -z "$changes" ]] && exit +if [ ! $fresh_clone ] && [[ -z "$changes" ]]; then + exit +fi # Update databse php index.php tools update_database @@ -24,4 +27,4 @@ if [[ ! -f ./data/js/main.min.js ]]; then fi # Show changes to NEWS -git diff @{1} NEWS | cat +git diff @{1} NEWS 2> /dev/null | cat |