From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: Re: Weirdness with port-update hook and local push
Date: Mon, 05 Dec 2005 14:11:34 -0800 [thread overview]
Message-ID: <7vk6ej9otl.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0512051651050.25300@iabervon.org> (Daniel Barkalow's message of "Mon, 5 Dec 2005 17:01:04 -0500 (EST)")
Daniel Barkalow <barkalow@iabervon.org> writes:
> The thing that confuses me is that it works when run from ssh or directly,
> but not when run from a local push. I'd expect the two that work to be
> most different.
One suspicion and one suggestion (without knowing exactly where
that suggestion might lead us to).
- your stdout/stderr might be connected to somewhere that your
output gets stuck ("broken pipe"), when your script is run
from the hook.
- your environment might be different from what you are
assuming.
How about doing something like this?
#!/bin/sh
+ exec >/var/tmp/hook-out.$$ 2>/var/tmp/hook-err.$$
+ echo "** env **"
+ env
+ echo "** vars **"
+ i=0
+ for v
+ do
+ echo "$i: $v"
+ i=$(($i+1))
+ done
+ echo "** pwd etc **"
+ pwd
+ id -a
unset GIT_DIR
cd /home/barkalow/auto-working/web
if ! git pull /home/barkalow/git/web.git/
and then next replace the whole thing with:
exec >/dev/null 2>&1
next prev parent reply other threads:[~2005-12-05 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 20:36 Weirdness with port-update hook and local push Daniel Barkalow
2005-12-05 20:40 ` Johannes Schindelin
2005-12-05 22:01 ` Daniel Barkalow
2005-12-05 22:11 ` Junio C Hamano [this message]
[not found] ` <Pine.LNX.4.63.0512052318290.3406@wbgn013.biozentrum.uni-wuerzburg.de>
2005-12-06 1:12 ` Daniel Barkalow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk6ej9otl.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox