Explorar o código

isgitrepo : return 0 if in git repo, 128 otherwise

Jovian (Darkside) %!s(int64=6) %!d(string=hai) anos
pai
achega
ca008a0ec8
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      Useful/isgitrepo

+ 5 - 0
Useful/isgitrepo

@@ -0,0 +1,5 @@
+#!/bin/bash
+# Return 0 if you are in a git repo
+# Return 1 otherwise
+
+git rev-parse --is-inside-work-tree > /dev/null 2>&1