summaryrefslogtreecommitdiffstats
path: root/src/subgit-check
diff options
context:
space:
mode:
authorLouis Burda <dev@sinitax.com>2025-10-28 22:22:15 +0100
committerLouis Burda <dev@sinitax.com>2025-10-28 22:22:15 +0100
commit64c4396bca419044bbf591077eb030df3171ebf2 (patch)
tree21d96f66f45eda175d1d64303435b02592ce9b76 /src/subgit-check
parente7600accd87ddb692d534519385374c1cdef1721 (diff)
downloadsubgit-64c4396bca419044bbf591077eb030df3171ebf2.tar.gz
subgit-64c4396bca419044bbf591077eb030df3171ebf2.zip
Add testcases
Diffstat (limited to 'src/subgit-check')
-rwxr-xr-xsrc/subgit-check2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/subgit-check b/src/subgit-check
index 5a27b0a..d86dc32 100755
--- a/src/subgit-check
+++ b/src/subgit-check
@@ -41,7 +41,7 @@ subgit-sub subrepo "$@" | while read -r subrepo; do
fi
branch=$(git -C "$bare" branch --show-current)
- if [ "${subgitinfo[$relpath/branch]}" != "$branch" ]; then
+ if [ ! -z "${subgitinfo[$relpath/branch]}" ] && [ "${subgitinfo[$relpath/branch]}" != "$branch" ]; then
echo "$relpath: new branch - '$branch'"
fi