From ef188b5db742bafe58cd04a4f811138f5ab3845b Mon Sep 17 00:00:00 2001 From: TidosDK <28749155+TidosDK@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:58:20 +0200 Subject: [PATCH 1/3] Added configuration for git credentials in setup --- bisect/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bisect/setup.sh b/bisect/setup.sh index d2c8bf79..35f3d48f 100755 --- a/bisect/setup.sh +++ b/bisect/setup.sh @@ -2,6 +2,7 @@ source ../utils/utils.sh make-exercise-repo +config-local-username echo '#! /usr/bin/env bash' > 'test.sh' echo 'if [[ $(( $(find * | wc -l) + 10 )) -gt 32 ]] ;then' >> 'test.sh' From 8bf583a830cefce400ada0af397cde7d77fae780 Mon Sep 17 00:00:00 2001 From: TidosDK <28749155+TidosDK@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:58:30 +0200 Subject: [PATCH 2/3] Fixed bug in bisect verify.sh --- bisect/verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bisect/verify.sh b/bisect/verify.sh index fa666300..b48740b9 100755 --- a/bisect/verify.sh +++ b/bisect/verify.sh @@ -1,7 +1,7 @@ #! /usr/bin/env sh cd exercise -if [[ "$(git log -1 --format='%s' refs/bisect/bad -- )" = '22' ]] ; then +if [ "$(git log -1 --format='%s' refs/bisect/bad -- )" = '22' ] ; then echo "You managed to find the bad commit with bisect" else echo "You have still stuff to do" From 913b575c8b3cd4a81cc768c81613311db9b20d98 Mon Sep 17 00:00:00 2001 From: Jan Krag Date: Mon, 4 Nov 2024 13:45:15 +0100 Subject: [PATCH 3/3] Use pre-setup & post-setup as suggested in review --- bisect/setup.sh | 4 ++-- bisect/verify.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bisect/setup.sh b/bisect/setup.sh index 35f3d48f..5017d3c8 100755 --- a/bisect/setup.sh +++ b/bisect/setup.sh @@ -1,8 +1,7 @@ #!/bin/bash source ../utils/utils.sh -make-exercise-repo -config-local-username +pre-setup # Make exercise repo, and setup necessary. echo '#! /usr/bin/env bash' > 'test.sh' echo 'if [[ $(( $(find * | wc -l) + 10 )) -gt 32 ]] ;then' >> 'test.sh' @@ -24,3 +23,4 @@ do git commit -m $i done +post-setup \ No newline at end of file diff --git a/bisect/verify.sh b/bisect/verify.sh index b48740b9..965bb83e 100755 --- a/bisect/verify.sh +++ b/bisect/verify.sh @@ -1,6 +1,6 @@ #! /usr/bin/env sh -cd exercise +cd exercise || exit if [ "$(git log -1 --format='%s' refs/bisect/bad -- )" = '22' ] ; then echo "You managed to find the bad commit with bisect" else