Re: Inconsistencies with git log
- From
Andreas Ericsson <ae@op5.se>
- Date
- Nov 8, 2007, 00:16 UTC
- Message-ID
- <4732556F.30105@op5.se>
- In-Reply-To
- <9e4733910711071609t3e5412f1mf02e501b2d820bb3@mail.gmail.com>
Jon Smirl wrote:
Show 15 quoted lines
> On 11/7/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: >> It is consistent, when you realise that the path arguments are interpreted >> relative to the project root. > > Then why doesn't this work? > > jonsmirl@terra:~/mpc5200b$ git log Documentation > all the log for Documentation.... > jonsmirl@terra:~/mpc5200b$ cd Documentation > jonsmirl@terra:~/mpc5200b/Documentation$ git log Documentation > fatal: ambiguous argument 'Documentation': unknown revision or path > not in the working tree. > Use '--' to separate paths from revisions > jonsmirl@terra:~/mpc5200b/Documentation$ >
Because your current working directory, relative to the project root, is prepended to the path you're in, so git sees "Documentation/Documentation". I'm unsure why
cd Documentation; git log -- /Documentation
doesn't do the trick though. I know that particular trick used to work for some other command a while back anyways.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231