aboutsummaryrefslogtreecommitdiff
path: root/rsup
diff options
context:
space:
mode:
Diffstat (limited to 'rsup')
-rwxr-xr-xrsup6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsup b/rsup
index c90a8a3..59d95d0 100755
--- a/rsup
+++ b/rsup
@@ -57,7 +57,11 @@ function upward_commit {
}
# Check if it is a git repository
-if [ ! -d ".git" ]; then
+# Thanks https://stackoverflow.com/questions/4917871/does-git-return-specific-return-error-codes#comment124785102_19441790
+#git status &> /dev/null
+#if [ ! -d ".git" ]; then
+#if [ "$?" == "128" ]; then
+if [ "`git rev-parse --is-inside-work-tree &> /dev/null`" == "true" ]; then
echo "$BASENAME: not a git repository"
exit 1
fi