error when pass argument to the alias of git command

54 views
Skip to first unread message

IaMaPlAyEr

unread,
Sep 3, 2011, 11:42:37 AM9/3/11
to msy...@googlegroups.com
Dear developers,

I had a problem of msysgit before, and asked somebody's help on stackoverflow.com,
but now, I thought maybe it a bug, so I send the whole message to here

http://stackoverflow.com/questions/7278796/error-when-pass-argument-to-the-alias-of-git-command

I know Git alias can be with argument Git Faq section "Git Aliases with argument".

But today I occur a error.

Take a easy example which is not suit for real use. If I make a alise like this:

[alias]
    lo
= "!sh -c 'git log $1' -"

then I can use

git lo file_a

to see the log of file_a.

But when with "tab" to auto-complete the path, the error occurs.

git lo [tab]

error msg:

sh: declare: `_git_{': not a valid identifier

It seems a bug in git-completion.bash. But I can't find where the `_git_{' is!

and I find, in the error msg, the quote mark around _git_{ seems strange.

BTW, my msysgit version is 1.7.6-preview20110708

ADD:

The other strange thing is, I searched all files under the dir of Git, find there is no file contains the string _git_{.


 
 
I only see that completion error in the got bash command though, not in a git cmd session, where the completion works well. – VonC yesterday

You means it's a bash error? No related with Git? – HaveF 4 hours ago 
 
 
it looks like it is – VonC 2 hours ago

Yes, maybe you are right. I test this alias in Git 1.7.4 on Debian, it seems all right. Maybe this bug is taken by the bash which shipped with msysgit. I will report it to msysgit community.Thanks, VonC! – HaveF 34 secs ago edit 




--
--
Sincerely,

HaveF
Reply all
Reply to author
Forward
0 new messages