Weird behavior of shell variables in git aliases
- From
Dun Peal <dunpealer@gmail.com>
- Date
- Mar 21, 2011, 16:39 UTC
- Message-ID
- <d9c38309-c433-476c-bba3-f2c5b7e94a89@k15g2000prk.googlegroups.com>
It seems that a variable is available only once?! How can the following shell session be explained:
$ git config alias.test0
!echo $1
$ git test0 foo
foo
$ git config alias.test1
!echo $1 && echo $1
$ git test1 foo foo
$ git config alias.test2
!BRANCH=$1 && echo $BRANCH && echo $BRANCH
$ git test2 foofoo
Thanks, D.