paulirish / git-recent

See your latest local git branches, formatted real fancy
https://www.npmjs.com/package/git-recent
MIT License
970 stars 36 forks source link

error: unknown option `color=always' #16

Open ilovezfs opened 6 years ago

ilovezfs commented 6 years ago

This affects OS X 10.11 and below.

==> brew test git-recent --verbose
==> FAILED
Testing git-recent
/usr/bin/sandbox-exec -f /tmp/homebrew20180303-48976-qdimti.sb /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-recent.rb --verbose
==> git init
Initialized empty Git repository in /private/tmp/git-recent-test-20180303-48977-s6zris/.git/
==> git recent
error: unknown option `color=always'
usage: git for-each-ref [<options>] [<pattern>]
   or: git for-each-ref [--points-at <object>]
   or: git for-each-ref [(--merged | --no-merged) [<object>]]
   or: git for-each-ref [--contains [<object>]]

    -s, --shell           quote placeholders suitably for shells
    -p, --perl            quote placeholders suitably for perl
    --python              quote placeholders suitably for python
    --tcl                 quote placeholders suitably for Tcl

    --count <n>           show only <n> matched refs
    --format <format>     format to use for the output
    --sort <key>          field name to sort on
    --points-at <object>  print only refs which points at the given object
    --merged <commit>     print only refs that are merged
    --no-merged <commit>  print only refs that are not merged
    --contains <commit>   print only refs which contain the commit
lildesert commented 6 years ago

I updated git from 2.8.3 to 2.16.2 and I'm not having the issue anymore.

ilovezfs commented 6 years ago

@lildesert yes, that's a workaround but a dependency on a third-party Git is a bit much.

paulirish commented 6 years ago

a dependency on a third-party Git is a bit much.

@ilovezfs well i understand that requiring a minimum git version is kind of a pain, but we're certainly not requiring a "third-party git".. just a newer version. Given that there are known vulnerabilities in 2.8, I think it's fair to expect users are up-to-date.

btw thanks for bumping the homebrew formula!

Nateowami commented 6 years ago

@paulirish Ubuntu's 14.04 repos have git at 2.7.4. I don't think it's unreasonable to think users will be using what's in the repos of an LTS (it's certainly what I use). 18.04 has git at 2.17.0, but it hasn't been out for very long.

vamsiampolu commented 5 years ago

I am on the following config:

I installed git-recent using brew:

 $ brew install git-recent

This is the error that I see when I run $ git recent -n5:

error: unknown option `color=always'
usage: git for-each-ref [<options>] [<pattern>]
   or: git for-each-ref [--points-at <object>]
   or: git for-each-ref [(--merged | --no-merged) [<object>]]
   or: git for-each-ref [--contains [<object>]]

followed by the help message.

   -s, --shell           quote placeholders suitably for shells
    -p, --perl            quote placeholders suitably for perl
    --python              quote placeholders suitably for python
    --tcl                 quote placeholders suitably for Tcl

    --count <n>           show only <n> matched refs
    --format <format>     format to use for the output
    --sort <key>          field name to sort on
    --points-at <object>  print only refs which points at the given object
    --merged <commit>     print only refs that are merged
    --no-merged <commit>  print only refs that are not merged
    --contains <commit>   print only refs which contain the commit
    --ignore-case         sorting and filtering are case insensitive