summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/leap_cli/util.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb
index 64b5c63..29658da 100644
--- a/lib/leap_cli/util.rb
+++ b/lib/leap_cli/util.rb
@@ -428,6 +428,15 @@ module LeapCli
return $? == 0
end
end
+
+ def is_git_subrepo?(dir)
+ Dir.chdir(dir) do
+ `ls .gitrepo 2>/dev/null`
+ return $? == 0
+ end
+ end
+
+
def current_git_branch(dir)
Dir.chdir(dir) do