diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-08-02 22:20:40 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-08-02 22:20:40 -0300 |
commit | b2bd615615eba504a04c851769e138b554b97688 (patch) | |
tree | fbd55265584271f81bfd309b2a103b2cbd67a32f /rsup | |
parent | 251549d447574f9f20f35c97cb79a24f66eb5c07 (diff) | |
download | utils-git-b2bd615615eba504a04c851769e138b554b97688.tar.gz utils-git-b2bd615615eba504a04c851769e138b554b97688.tar.bz2 |
Fix: sup, rsup: git repository check
Diffstat (limited to 'rsup')
-rwxr-xr-x | rsup | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |