Make git repo detection cleverer

Currently, the script just checks whether we are inside a git
repository. However, in my setup, my home directory is a git repository
and that means that I have to run the script in an entirely different
place which is very annoying.

The new behavior is to check whether we are inside the same repository
as the dev-setup-git script.

Change-Id: I9072ad7a96f3521b470fd400d867c733a143b0d2
diff --git a/dev-setup-git.sh b/dev-setup-git.sh
index d29b70a..70845da 100755
--- a/dev-setup-git.sh
+++ b/dev-setup-git.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-if git rev-parse &> /dev/null; then
-  echo "Error: run this from a new build directory, not from within a git repo"
+if [[ "$(git rev-parse --show-toplevel)" = "$(dirname -- "${BASH_SOURCE[0]}")" ]]; then
+  echo "Error: run this from a new build directory, not from within the br2-external git repo"
   exit 1
 fi