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
|
||||
fi
|
||||
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}"
|
||||
fi
|
||||
if [ -z "$title" ]; then
|
||||
|
||||
Reference in New Issue
Block a user