Re: print errors from git-update-ref
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Jul 28, 2006, 06:27 UTC
- Message-ID
- <20060728062720.GC30783@spearce.org>
- In-Reply-To
- <Pine.LNX.4.63.0607271302150.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 11 quoted lines
> 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.