Fix silent crash in base-branch fallback when origin/HEAD symref is unset
This commit is contained in:
+1
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user