From: Richard Levitte Date: Tue, 18 Apr 2023 13:58:48 +0000 (+0200) Subject: Include the original HEAD in the porcelain output X-Git-Url: https://git.openssl.org/?a=commitdiff_plain;h=b99e62ffc84d6a8b40d3b03a38d78047287cc2df;hp=1fce24a09743e599225a96dcfdb4b212f2a37714;p=tools.git Include the original HEAD in the porcelain output Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/tools/pull/140) --- 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 <