From b99e62ffc84d6a8b40d3b03a38d78047287cc2df Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 18 Apr 2023 15:58:48 +0200 Subject: [PATCH 1/1] Include the original HEAD in the porcelain output Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/tools/pull/140) --- release-tools/stage-release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release-tools/stage-release.sh b/release-tools/stage-release.sh index aac5447..437587f 100755 --- a/release-tools/stage-release.sh +++ b/release-tools/stage-release.sh @@ -313,6 +313,7 @@ if ! orig_remote_url=$(git remote get-url $orig_remote 2>/dev/null); then # If there is no registered remote, then $orig_remote is the URL orig_remote_url="$orig_remote" fi +orig_head=$(git rev-parse --abbrev-ref '@{u}' 2>/dev/null || git rev-parse HEAD) # Make sure it's a branch we recognise if (echo "$orig_branch" \ @@ -481,7 +482,6 @@ $DEBUG >&2 "DEBUG: Source directory is $SOURCEDIR" # We always expect to start from a state of development if [ "$TYPE" != 'dev' ]; then - upstream=$(git rev-parse --abbrev-ref '@{u}' 2>/dev/null || echo 'HEAD^') if $clean_worktree; then cat >&2 <