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

Error on trying to use git shortlog summary #118

Closed
gkotian opened this issue Jun 18, 2015 · 5 comments
Closed

Error on trying to use git shortlog summary #118

gkotian opened this issue Jun 18, 2015 · 5 comments

Comments

@gkotian
Copy link

gkotian commented Jun 18, 2015

I get the following error when trying to do git shortlog --summary --numbered on any of my repos:

./vimcat: 80: ./vimcat: Syntax error: "(" unexpected

The problem is when using the --summary argument (without that argument, things work as expected).

As a workaround, I'm using PAGER=/usr/bin/less git shortlog --summary --numbered

@rkitover
Copy link
Owner

I cannot reproduce this. Are you using the latest version? In my vimcat line 80 is a blank line. If you are using the latest version, are you willing to do some debugging?

First I need your system specs, what is the OS, version and shell you are on.

@rkitover
Copy link
Owner

I think I see the problem, your shell must be a variant of ash and it does not have the same array support as bash and ksh likes. I'll try to fix this.

@gkotian
Copy link
Author

gkotian commented Jun 20, 2015

Ok, first off, I don't see this problem on my home computer where I'm running Ubuntu 14.04. I only saw it on my work computer where I have Ubuntu 12.04. bash is the shell I'm using on both systems.

Are you using the latest version?

I'm not sure actually. I have definitely not updated since the day I cloned vimpager, so it could very well be an older version.

I think I see the problem

Great if you have a handle on this; but I'll be more than happy to do some debugging if needed. But that's possible only on weekdays though.

rkitover added a commit that referenced this issue Jun 28, 2015
Somehow vimcat runs under dash for someone, and this breaks because of
the array syntax for $@ . Remove the array syntax for $@ because it is
completely unnecessary and $@ behaves like an array in all bourne shells
as it is.

Also do a couple of other minor cleanups, and rebuild vimpager.
rkitover added a commit that referenced this issue Jun 28, 2015
Instead of exiting with an error if a better shell is not found, set
_MY_SHELL to $SHELL or /bin/sh and continue. This should usually work
since we removed the array syntax.
@rkitover
Copy link
Owner

Try updating your clone, the issue should be fixed.

@gkotian
Copy link
Author

gkotian commented Jun 29, 2015

Yup. Update + another sudo make install fixed it. Thanks.

@gkotian gkotian closed this as completed Jun 29, 2015
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

2 participants