Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on RHEL 6 (with git 1.7.1) as "git rev-list" supports "--count" only since git 1.7.2 #12

Open
xtaran opened this issue Oct 18, 2018 · 0 comments

Comments

@xtaran
Copy link

xtaran commented Oct 18, 2018

If I use zsh-vcs-prompt (current master at 68d68a5) on Red Hat Enterprise Linux (RHEL) 6, I always get a prompt like this:

usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]                                                   
  limiting output:
    --max-count=nr
    --max-age=epoch
    --min-age=epoch
    --sparse
    --no-merges
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=nr | --no-abbrev
    --abbrev-commit
    --left-right
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
!8206 Z16 ?0 L1 ssh …@…:~/.zsh/zsh-vcs-prompt (pts/3 zsh 4.3.11 RHEL 6.10) 14:29:28 (git) [master|+1]
~/.zsh/zsh-vcs-prompt →

The last two lines are the expected prompt, the lines above are triggered by line 174 of vcsstatus.sh.

Reason is that RHEL 6 ships with git 1.7.1 and the option --count was only introduced just one release afterwards with git 1.7.2. :-(

Interestingly the usage of --count in gitstatus-fast.py line 133 doesn't seem to cause such issues for me. Maybe I never had a case where this was used, so I'd expect that it needs the same fix.

It's annoying, but I currently have no idea how this could be easily fixed without dropping functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant