From: Travis P <git@castle.fastmail.fm>
To: git@vger.kernel.org
Subject: How to handle terminal detection in a daemon calling git?
Date: Wed, 30 May 2012 16:16:47 -0500 [thread overview]
Message-ID: <1338412607.9452.140661082904349.02F677C3@webmail.messagingengine.com> (raw)
I've got a script that runs in the background without a terminal.
It actually does have STDOUT and STDERR set to a rotating log file.
When it runs:
/bin/sh -c 'cd /to/my/wc; git pull --ff-only'
the git command fails (rc 32768).
When it runs
/bin/sh -c 'cd /to/my/wc; git pull --ff-only > /to/a/file 2>&1'
or even
/bin/sh -c 'cd /to/my/wc; git pull --ff-only | cat'
then all is well. The command succeeds (rc 0, and I see the expected
results).
Piping through 'cat' is okay, but I'd rather avoid the 'trick'. Is
there
some way to communicate to git that it should operate just as if output
were redirected?
-Travis
next reply other threads:[~2012-05-30 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 21:16 Travis P [this message]
2012-05-31 1:29 ` How to handle terminal detection in a daemon calling git? Jeff King
2012-05-31 6:22 ` Junio C Hamano
2012-05-31 13:39 ` Travis P
2012-06-01 9:53 ` Jeff King
2012-06-01 13:52 ` Travis
2012-06-02 16:51 ` Jeff King
2012-05-31 13:43 ` Travis P
2012-05-31 3:14 ` Sitaram Chamarty
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=1338412607.9452.140661082904349.02F677C3@webmail.messagingengine.com \
--to=git@castle.fastmail.fm \
--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;
as well as URLs for NNTP newsgroup(s).