git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [OT?] Executing Git from bash script invoked by cron

From
JSJohannes Schneider <mailings@cedarsoft.com>
Date
Jul 3, 2010, 17:19 UTC
Message-ID
<4C2F7137.6020209@cedarsoft.com>
In-Reply-To
<1277759597-sup-9397@nixos>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/28/2010 11:17 PM, Marc Weber wrote:
> sh -c 'your quoted command &> /tmp/logfile'
> 
> b) if this still does not work use strace:

That is it. Thanks. Of course, git writes to stderr. And I did not redirect it properly. I don't understand the details, but this line is working now:

sh -c 'myscript' >> logfile 2> err

The problem - by the way - is related to ssh authentification... But that is another issue...

But here comes my question: Obviously all output created by git push is written to stderr. I'd expected that most of the content will end up in stdout. But I am sure there is a good reason for it - so I just accept it ;-)

Thanks,
Johannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJML3E0AAoJEAytD9R7Qv6dZ5cIANpYYu5isncB3LcLaQgURQmP esxkrtAVrcghItv+KkSts+qb8IBlEmA1mkzMYpmgVn6M/CQxh3atlaDsTbNtznAA eZVJwXqQwoPlJS8ZvoDcSdldcL5Nmi+nyJgg408y5j3GB4AEt8IihxYVW7Xs0pFQ GdBOSjV/TK1PEjcP7dNYJ9MSdUFA6Z7GrywRKQwlRZ4C611wCBpEoAeD0S1vcJcl B78DTIqB+P3VF+mLW3u2LRXUdp3+tM2uutGR7DkG6GVomHJkwb5zAGXU4AmwHt2L OdDwPAAZ5OzAgfyqLZ4YrOMv9Pg8sOjj+YLfljLUIXB/muJPACqNljv+liCmrac= =X2Lj -----END PGP SIGNATURE-----

Previous: Sverre RabbelierNext: Ramkumar Ramachandra
Message 5 of 7 in “[OT?] Executing Git from bash script invoked by cron”
  1. Johannes SchneiderJun 28, 2010
  2. Sverre RabbelierJun 28, 2010
  3. Marc WeberJun 28, 2010
  4. Sverre RabbelierJun 28, 2010
  5. Johannes SchneiderJul 3, 2010
  6. Ramkumar RamachandraJun 28, 2010
  7. Matthieu MoyJun 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.