Change git -C reset to git reset#943
Change git -C reset to git reset#943dqminh merged 1 commit intoopencontainers:masterfrom johnbieren:master
Conversation
|
On Thu, Jul 14, 2016 at 09:08:09AM -0700, Johnny Bieren wrote:
Oops, sorry I suggested it 1 without checking :p. Instead of cd'ing ( which keeps a check for successfully resetting and avoids needing to |
|
Here is some details about the problem: |
|
@johnbieren Could you update the PR with @wking suggestion? |
|
@mrunalp done |
|
c4b688b looks good to me, although the indent seems inconsistent.
I'm also not familiar enough with bats to know what ‘run’ is for;
maybe it should go outside the subshell? You could test this by
putting a ‘rm -rf src/runtime-spec’ in front of the subshell and
ensuring that the test failed in that case.
|
|
@wking I have fixed the indentation and can confirm that the test passes as written and putting a rm -rf src/runtime-spec in front of the subshell forces the test to fail |
|
On Mon, Jul 25, 2016 at 12:07:23PM -0700, Johnny Bieren wrote:
Thanks for testing :). 6c7d2bb looks good to me, although I'd have
|
| SPEC_COMMIT=$(grep runtime-spec ${TESTDIR}/../../Godeps/Godeps.json -A 4 | grep Rev | cut -d":" -f 2 | tr -d ' "') | ||
| run git -C src/runtime-spec reset --hard "${SPEC_COMMIT}" | ||
| ( | ||
| cd src/runtime-spec && |
There was a problem hiding this comment.
Yeah, let's indent this more.
Signed-off-by: Johnny Bieren <jbieren@redhat.com>
git -C reset --hard is not supported with older versions of git. For tests/integration/spec.bats I changed from git -C to cd to the directory, run the git reset, then cd back where you were. Very simple change, but it fixes problems with older versions of git.