Commit 86485cec authored by David Johnson's avatar David Johnson

Minor bugs; too many languages.

parent cc3adb34
Pipeline #2146 passed with stage
in 35 seconds
#!/bin/sh #!/bin/sh
function get_tag_for_commit() { get_tag_for_commit() {
local repo="$1/.git" local repo="$1/.git"
local CID=$2 local CID=$2
local tagfile local tagfile
...@@ -15,13 +15,13 @@ function get_tag_for_commit() { ...@@ -15,13 +15,13 @@ function get_tag_for_commit() {
return 1 return 1
} }
function is_detached() { is_detached() {
local repo="$1/.git" local repo="$1/.git"
cat $repo/HEAD | grep -q 'ref:' $head cat $repo/HEAD | grep -q 'ref:' $head
return $? return $?
} }
function is_dirty() { is_dirty() {
local root="$1" local root="$1"
local repo="$root/.git" local repo="$root/.git"
local tmp local tmp
...@@ -39,7 +39,7 @@ function is_dirty() { ...@@ -39,7 +39,7 @@ function is_dirty() {
fi fi
} }
function dirty_str() { dirty_str() {
local root="$1" local root="$1"
local rc local rc
...@@ -58,7 +58,7 @@ function dirty_str() { ...@@ -58,7 +58,7 @@ function dirty_str() {
esac esac
} }
function get_current_branch_or_tag() { get_current_branch_or_tag() {
local root="$1" local root="$1"
local repo="$root/.git" local repo="$root/.git"
local cid local cid
...@@ -81,7 +81,7 @@ function get_current_branch_or_tag() { ...@@ -81,7 +81,7 @@ function get_current_branch_or_tag() {
echo "$branch_or_tag" echo "$branch_or_tag"
} }
function get_current_commit() { get_current_commit() {
local root="$1" local root="$1"
local repo="$root/.git" local repo="$root/.git"
local refname local refname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment