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

Re: pretty format can't work on cron job

From
Thomas Rast <trast@student.ethz.ch>
Date
Nov 7, 2010, 19:18 UTC
Message-ID
<201011072018.31740.trast@student.ethz.ch>
In-Reply-To
<01c101cb7d6c$fd053cf0$f70fb6d0$@com>
Chen WANG wrote:
> $ cat /home/wangchen/kps_update
> #!/bin/bash
> su wangchen -

What is this 'su' supposed to do? AFAICS you would have to run another script with 'su' if you really want to change user.

> git log 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.. -M --date=short --pretty=format:"Author: %aN <%ae>; Date: %ad" --shortstat --dirstat --no-merges >/tmp/ChangeLog-all
[%aN does not expand to anything within the cron runs]

Also, what git version(s) do you have installed? %aN appeared in 1.5.6.4 and 1.6.0, so it is entirely possible that the $PATH within your cronjob runs an older version which fails to expand it to anything.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Chen WANGNext: Chen WANG
Message 6 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.