gnustavo / Git-Hooks

Framework for implementing Git (and Gerrit) hooks
http://search.cpan.org/dist/Git-Hooks/
41 stars 17 forks source link

t/02-prepare-log.t failures (2.6.0) #45

Closed eserte closed 6 years ago

eserte commented 6 years ago

On a Ubuntu 16.04 system I see the following failure:

# git version 2.7.4

#   Failed test 'prepare in trailer'
#   at lib/Git/Hooks/Test.pm line 267.
#  exit=1
#  stdout=
#  stderr=
# [Git::Hooks(prepare-commit-msg)] Hook failed:
# 
#   error: unknown option `in-place'
#   usage: git interpret-trailers [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]
#   
#       --trim-empty          trim empty trailers
#       --trailer <trailer>   trailer(s) to add
#    at /home/cpansand/.cpan/build/2018022618/Git-Hooks-2.6.0-2/blib/lib/Git/Hooks/PrepareLog.pm line 59.
# 
# 
#  git-version=2.7.4
# Looks like you failed 1 test of 6.
t/02-prepare-log.t ....... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 
gnustavo commented 6 years ago

Oops. I thought that the --in-place option was implemented in Git 2.7.4 but in fact it was implemented only on Git 2.8.0.

I'll amend the test and release a bugfix version asap.

Thank you.

gnustavo commented 6 years ago

I just uploaded v2.6.1 to PAUSE. It should appear on CPAN shortly. Please, let me know if it fixes this.

eserte commented 6 years ago

Yes, it looks better: http://fast-matrix.cpantesters.org/?dist=Git-Hooks%202.6.2 But not yet perfect: it fails on my CentOS6 smoker with git 1.7.1:

#   Failed test 'do not prepare by default'
#   at lib/Git/Hooks/Test.pm line 267.
#  exit=129
#  stdout=
#  stderr=error: unknown option `allow-empty-message'
# usage: git commit [options] [--] <filepattern>...
# 
...
gnustavo commented 6 years ago

Yes. I just released v.2.6.3 to fix this test. Please, check it out when it appears on CPAN.

eserte commented 6 years ago

Looks fine so far: http://fast-matrix.cpantesters.org/?dist=Git-Hooks%202.6.3