<commit_before>#!/bin/bash
# Rebase source on top of based branch

set -evuo pipefail

export GIT_COMMIT=$(git rev-parse --verify "HEAD^2" 2>/dev/null || echo $BUILD_SOURCEVERSION)
echo "##vso[task.setvariable variable=GIT_COMMIT]$GIT_COMMIT"

git reset --hard "$GIT_COMMIT"

if [[ $BUILD_SOURCEBRANCH == refs/tags/* ]]; then
  git checkout -q "$BUILD_SOURCEBRANCHNAME"
elif [ -n "$SYSTEM_PULLREQUEST_SOURCEBRANCH" ]; then
  git checkout -q -B "$SYSTEM_PULLREQUEST_SOURCEBRANCH"
fi

git reset --hard "$GIT_COMMIT"<commit_msg>chore(ci): fix rebase command (#2779)<commit_after>#!/bin/bash
# Rebase source on top of based branch

set -evo pipefail

export GIT_COMMIT=$(git rev-parse --verify "HEAD^2" 2>/dev/null || echo $BUILD_SOURCEVERSION)
echo "##vso[task.setvariable variable=GIT_COMMIT]$GIT_COMMIT"

git reset --hard "$GIT_COMMIT"

if [[ $BUILD_SOURCEBRANCH == refs/tags/* ]]; then
  git checkout -q "$BUILD_SOURCEBRANCHNAME"
elif [ -n "$SYSTEM_PULLREQUEST_SOURCEBRANCH" ]; then
  git checkout -q -B "$SYSTEM_PULLREQUEST_SOURCEBRANCH"
fi

git reset --hard "$GIT_COMMIT"
{'fraction_non_alphanumeric': 0.13793103448275862, 'fraction_numerical': 0.007455731593662628, 'mean_word_length': 5.355029585798817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7517272', 'n_tokens_mistral': 408, 'n_tokens_neox': 392, 'n_words': 99}