I'm trying to run this command in cygwin:
$ git log --oneline --graph --decorate --all '@{u}..HEAD'
fatal: ambiguous argument '@u..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
As you can see from that error, it thinks I'm passing in @u..HEAD instead of @{u}..HEAD. Why are the curly braces being removed and how can I prevent this?
I am using bash:
$ echo $SHELL
/bin/bash
I think this may be the git command doing this, because if I just use echo, the curly braces stay:
$ echo '@{u}..HEAD'
@{u}..HEAD
Here's other info that may help:
$ git version
git version 1.7.9
$ type -a git
git is /c/cygwin/bin/git
$ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
svn-remote.svn.url=https://myrepo/svn/results
svn-remote.svn.fetch=trunk:refs/remotes/trunk
svn-remote.svn.branches=branches/*:refs/remotes/*
svn-remote.svn.tags=tags/*:refs/remotes/tags/*
$ git rev-parse --symbolic-full-name @{u}
fatal: ambiguous argument '@u': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
@u
Also if those /c paths are throwing you off, be aware that my .bashrc file has this line in it for my convenience: mount c: /c
Work Around: If I use this command instead git log --oneline --graph --decorate -- '@{u}..HEAD' it does not complain. Notice the "--". But by all accounts on IRC, I shouldn't have to do this.