bug/1144800: Fix fatal: both revision and filename

Although bug/1144800 as described was fixed in
Icd62c2ee359b95877097a57a3b517434d9f7f5e0
there is still a corner case where "HEAD" is the
file in the repository.

Change-Id: I0954e99b972a5b008fa7a0b9a64824b8daacd541