On Thu, 6 Oct 2011 08:40:37 -0700 (PDT)
tombert <tomb...@live.at> wrote:

> When I'am calling:
> git log 7de0e15 7de0e15 <myfile>
> it actually returns the log for two commits! I would expect only one.
> As a workaround I have to use "-n 1"
> git log 7de0e15 7de0e15 -n 1 <myfile>
> Is this a bug?

$ git log 7de0e15 7de0e15 <myfile>
tells Git "show me all the commits from the root commit until
commit 7de0e15, inclusive, which touch files named 7de0e15 and

That is, you missed that ".." bit between <since> and <until> in the
manual.  Moreover, take your time and actually read through the
gitrevisions manual page for what the git-log manual page lists is an
oversimplification (while being the most useful one).

The second problem is that git log shows the set of *changes* between
the specified revisions; if the revisions are the same, there are no
changes, so
$ git log 7de0e15..7de0e15 <myfile>
would return no records.
The correct way instead is to do
$ git log 7de0e15^..7de0e15 <myfile>
that is, the set of changes between the (first) parent of 7de0e15 and

In any case, running git-log for a single changeset but with
specifying a file appear to have little sense to me; you probably wanted
to run
$ git show 7de0e15 <myfile>

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to