On Tue, 10 May 2011 11:36:20 -0400
Blu Dragon <bludragon...@gmail.com> wrote:

> > [...]
> >>    #strace git push -v $remote $branch 2&>  /var/log/strace-git.log
> >>    git push -v $remote $branch
> >> done
> >>
> >> exit 0
> > I wonder if strace'ing yields something of interest?
> > But for this to work you most probably pass the "-f" command-line
> > option to strace so that it also traces forked processes--Git is
> > modular and so it's quite possible that git-push runs a bunch of
> > other binaries when it does its job.
> > Hence I'd write it like this:
> > strace -f -o /tmp/git-strace.log git push -v "$remote" "$branch"
> Thanks for the suggestion. I had actually commented that out because
> I was receiving the same "permission denied" error even though I
> chmod-ed the log file to 777.
The shell process running your hook script should merely have a +w
write on the directory the log file is located at; for /tmp this can be
taken for granted without any additional work.

> I have meaning to play around with it
> but haven't gotten to it. The strace command was suggested by a
> co-worker but I have never used it before.
Good time to glance over its man page and do some googling as this
seems like a way to go forward in your case.
Basically, strace captures all syscalls a process (or a process
hierarchy) does and records it into a specified log file along with
their return codes.
So you can do a test run of your hook and then inspect the log file,
grepping it for "permission denied" or EPERM (see man errno on a
nearby Unix machine).

Please don't top-post and remove unnecessary quotations when answering
a message.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to