[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21166: 24.4; vc-mode and git error on newly added file to new reposi
bug#21166: 24.4; vc-mode and git error on newly added file to new repository
Fri, 31 Jul 2015 20:25:33 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0
On 07/31/2015 05:43 PM, Ed Avis wrote:
Type some text in the buffer, save with C-x C-s, then ask for a diff
with C-x v =. This fails with the following text at the bottom of the screen:
-UU-:----F1 a All L1 address@hidden (Fundamental) ---
fatal: bad revision 'HEAD'
Indeed, I can reproduce this.
But it's a relatively rare situation (no commits in the repo yet), and
the git diff output will be less useful than usual, since it's a given
that all your files are either added or simply unregistered.
To fix this, it seems we'll have to add an extra process call to
determine whether HEAD is a valid reference (Git internals apparently do
that). I'm not sure it's worth it.