We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0fb3736 + fa1dad9 commit c490d2dCopy full SHA for c490d2d
sdks/java/build-tools/beam-linkage-check.sh
@@ -69,9 +69,12 @@ if [ ! -z "$(git diff)" ]; then
69
exit 1
70
fi
71
72
-STARTING_REF=$(git rev-parse --abbrev-ref HEAD)
+# Use the full commit SHA instead of branch name to handle detached HEAD state.
73
+# This commonly happens when verifying someone else's PR, which involves
74
+# merging two non-branch references. See https://github.com/apache/beam/issues/20558
75
+STARTING_REF=$(git rev-parse HEAD)
76
function cleanup() {
- git checkout $STARTING_REF
77
+ git -c advice.detachedHead=false checkout $STARTING_REF
78
}
79
trap cleanup EXIT
80
0 commit comments