git log throws error "ambiguous argument"
Posted
by
LonelyPixel
on Super User
See other posts from Super User
or by LonelyPixel
Published on 2013-10-19T09:58:52Z
Indexed on
2013/10/25
9:59 UTC
Read the original article
Hit count: 196
This used to work about a year ago. Now it doesn't:
git log --abbrev=6
The expected result would be all commit hashes abbreviated to 6 characters.
The actual result is now this error message:
fatal: ambiguous argument '6': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
I have the impression that Git doesn't even know about that argument and tries to silently ignore its name but not the value.
Using Git 1.8.1.msysgit.1 on Windows 7.
Addition: Oh and it fails on other parameters, too. The entire command is:
git log --abbrev=6 --format=format:"----- Commit %%h on %%ci by %%an -----%%n%%n%%B"
If I just leave the abbrev part out, it still returns another error:
fatal: Invalid object name 'format'.
© Super User or respective owner