Fix silent crash in base-branch fallback when origin/HEAD symref is unset

This commit is contained in:
2026-07-12 17:32:21 -07:00
parent c6bdd09aae
commit 782ba516ca
+1 -1
View File
@@ -78,7 +78,7 @@ case "$subcommand" in
exit 1 exit 1
fi fi
if [ -z "$base" ]; then if [ -z "$base" ]; then
base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's#refs/remotes/origin/##') base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's#refs/remotes/origin/##' || true)
base="${base:-main}" base="${base:-main}"
fi fi
if [ -z "$title" ]; then if [ -z "$title" ]; then