On 05/03/2014 09:35 AM, Dennis Kaarsemaker wrote: > On vr, 2014-05-02 at 15:16 -0700, Jonathan Nieder wrote: >>> $ git checkout -b hotfix/b2 >>> error: unable to resolve reference refs/heads/hotfix/b2: Not a >> directory >>> fatal: Failed to lock ref for update: Not a directory >>> $ >> >> That's an ugly message. I think we can do better. (hint hint) > > 2.0.0-rc2 has a better message already: > > $ git checkout -b hotfix/b2 > error: 'refs/heads/hotfix' exists; cannot create 'refs/heads/hotfix/b2' > fatal: Failed to lock ref for update: Not a directory I was trying to remember when this was changed, but at first I couldn't reproduce the "fixed" error message at all. Finally I figured out that the the error message that you get depends on whether the existing reference is loose: $ bin-wrappers/git checkout -b master/foo error: unable to resolve reference refs/heads/master/foo: Not a directory fatal: Failed to lock ref for update: Not a directory vs. packed: $ bin-wrappers/git checkout -b base/foo error: 'refs/heads/base' exists; cannot create 'refs/heads/base/foo' fatal: Failed to lock ref for update: Not a directory It would be good to make the error message uniform and to document this restriction. Michael -- Michael Haggerty mhagger@xxxxxxxxxxxx http://softwareswirl.blogspot.com/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html