From 07fcec0f4e566df0cfb287b14a9703278d072019 Mon Sep 17 00:00:00 2001 From: Hoogervorst Date: Thu, 3 Oct 2019 13:18:17 +0200 Subject: [PATCH] fix commit order when using path filter and ci-skip disabled Signed-off-by: Hoogervorst --- assets/check | 10 +++++----- test/check.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/check b/assets/check index bfbacdeb..9fbcfdf4 100755 --- a/assets/check +++ b/assets/check @@ -118,17 +118,17 @@ get_commit(){ done } -if [ "$reverse" == "true" ] -then - list_command+=" --reverse" -fi - #if no range is selected just grab the last commit that fits the filter if [ -z "$log_range" ] then list_command+="| git rev-list --stdin -1" fi +if [ "$reverse" == "true" ] +then + list_command+="| git rev-list --stdin --first-parent --no-walk --reverse" +fi + if [ -n "$tag_filter" ]; then { if [ -n "$ref" ] && [ -n "$branch" ]; then diff --git a/test/check.sh b/test/check.sh index d87d0812..3cf438a0 100755 --- a/test/check.sh +++ b/test/check.sh @@ -105,7 +105,7 @@ it_can_check_from_a_ref() { local ref1=$(make_commit $repo) local ref2=$(make_commit $repo) local ref3=$(make_commit $repo) - + check_uri_from $repo $ref1 check_uri_from $repo $ref1 | jq -e " . == [ {ref: $(echo $ref1 | jq -R .)},