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

RE: pretty format can't work on cron job

From
Cchen_wang@trendmicro.com.cn <chen_wang@trendmicro.com.cn>
Date
Nov 5, 2010, 08:47 UTC
Message-ID
<7B2091481B9ED640A92789B0CA07059587CD03@CDCEXMAIL02.tw.trendnet.org>
In-Reply-To
<4CD3C262.6080108@viscovery.net>
Show 31 quoted lines
> -----Original Message-----
> From: Johannes Sixt [mailto:j.sixt@viscovery.net]
> Sent: 2010年11月5日 16:38
> To: Chen Wang (QA-CN)
> Cc: git@vger.kernel.org; ellre923@gmail.com
> Subject: Re: pretty format can't work on cron job
> 
> Am 11/5/2010 9:29, schrieb chen_wang@trendmicro.com.cn:
> >
> > For the command: git log 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.. -M
> --date=short --pretty=format:"Author: %aN <%ae>; Date: %ad" --shortstat
> --dirstat --no-merges
> >
> > I run it on shell by manual can create correct format of output, such as:
> > -------------------------------------------------
> > Author: Amit Shah <amit.shah@redhat.com>; Date: 2010-10-20
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> >  100.0% drivers/char/
> > -------------------------------------------------
> >
> > But when I put that command on cron job, even I run “. /etc/profile” and “.
> ~/.bash_profile” first, I can’t get correct format of output.
> > -------------------------------------------------
> > Author: %aN <amit.shah@redhat.com>; Date: Wed Oct 20 13:45:43 2010
> +1030
> >  100.0% drivers/char/
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> > -------------------------------------------------
> 
> % has a special meaning in a crontab. See man 5 crontab.
> 

I warped this command in script and trigger script in crontab. I think it's not the root cause, because %ae still works.

> -- Hannes

TREND MICRO EMAIL NOTICE The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.

Previous: Johannes SixtNext: Jeff King
Message 3 of 7 in “pretty format can't work on cron job”
  1. chen_wang@trendmicro.com.cnNov 5, 2010
  2. Johannes SixtNov 5, 2010
  3. chen_wang@trendmicro.com.cnNov 5, 2010
  4. Jeff KingNov 5, 2010
  5. Chen WANGNov 6, 2010
  6. Thomas RastNov 7, 2010
  7. Chen WANGNov 8, 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.