Re: Git push failure with update hook success
- From
Bill Lear <rael@zopyra.com>
- Date
- Mar 7, 2007, 16:46 UTC
- Message-ID
- <17902.60536.5890.608883@lisa.zopyra.com>
- In-Reply-To
- <17902.59497.831409.218529@lisa.zopyra.com>
On Wednesday, March 7, 2007 at 10:29:29 (-0600) Bill Lear writes:
>... >whether it might be better to call the update hook after everything >had actually been written, including the log file.
I dug into the code: in receive-pack.c, the command 'update(struct command *cmd)', calls write_ref_sha1() after run_update_hook() and does not check the return code of write_ref_sha1(). write_ref_sha1() will return an error if log_ref_write() fails, as it seems to in our case, here:
if (logfd < 0)
return error("Unable to append to %s: %s",
log_file, strerror(errno));On the client push side, we get:
error: Unable to append to logs/refs/heads/master: Permission denied
Bill