Subject: Re: print errors from git-update-ref

From: Shawn Pearce <[email-masked]>
Date: Fri, 28 Jul 2006 02:27:20 -0400

Johannes Schindelin <[email-masked]> wrote:
> Hi,
> 
> On Wed, 26 Jul 2006, Shawn Pearce wrote:
> 
> > This change adds a test for trying to create a ref within a directory
> > that is actually currently a file, and adds error printing within
> > the ref locking routine should the resolve operation fail.
> 
> Why not just print an error message when the resolve operation fails, 
> instead of special casing this obscure corner case? It is way shorter, 
> too. The test should stay, though.

Did you read the patch?  If resolve_ref returns NULL then this
change prints an error (from errno) no matter what.  If errno is
ENOTDIR then it tries to figure out what part of the ref path wasn't
a directory (but was attempted to be used as such) and prints an
ENOTDIR error about that path instead of the one actually given
to the ref lock function

So I think I'm doing what you are suggesting...

-- 
Shawn.