git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to handle terminal detection in a daemon calling git?
@ 2012-05-30 21:16 Travis P
  2012-05-31  1:29 ` Jeff King
  2012-05-31  3:14 ` Sitaram Chamarty
  0 siblings, 2 replies; 9+ messages in thread
From: Travis P @ 2012-05-30 21:16 UTC (permalink / raw)
  To: git


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-06-02 16:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 21:16 How to handle terminal detection in a daemon calling git? Travis P
2012-05-31  1:29 ` 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

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