Re: Git push failure with update hook success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]