Unverified Commit 1ebb5dd7 authored by Saverio Miroddi's avatar Saverio Miroddi Committed by Dennis Schubert
Browse files

Don't print a warning when starting the server outside a Git repo

Currently, git checks are performed on server start, even when outside a git
repository.

This commit verify the presence of a git repository (via `git status` exit
code), and perform checks only if it exists.

closes #7712
parent f8ce276d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
# 0.7.4.0

## Refactor
* Don't print a warning when starting the server outside a Git repo [#7712](https://github.com/diaspora/diaspora/pull/7712)

## Bug fixes

+13 −9
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ fi

command -v git > /dev/null 2>&1
if [ $? -eq 0 ]; then
  # Check if we're in a repository, before doing any verification.
  if git status > /dev/null 2>&1;
  then
    # Check if git merge is in progress
    if [ -f .git/MERGE_MODE ]; then
      fatal "A git merge is in progress!"
@@ -75,6 +78,7 @@ if [ $? -eq 0 ]; then
      warning "You are in detached HEAD state!"
    fi
  fi
fi

# Do RVM checks if RVM is being used
command -v rvm > /dev/null 2>&1