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

Re: [PATCH] Pretty-print date in 'git log'

From
David Woodhouse <dwmw2@infradead.org>
Date
Apr 18, 2005, 12:24 UTC
Message-ID
<1113827080.5286.10.camel@localhost.localdomain>
In-Reply-To
<20050418102744.GK1461@pasky.ji.cz>
On Mon, 2005-04-18 at 12:27 +0200, Petr Baudis wrote:
Show 5 quoted lines
> Yes. As far as I'm concerned, I'd put such stuff to git log, and extend
> it usage so that it is possible to print individual log entries with it
> - just make it accept a _range_ of commits, and then do
> 
>         git log $commit $commit

That's fairly trivial. In the current (and misguided) version with chronological output, rev-tree will do it all for you, in fact:

	rev-tree $1 ^$2
In the older and more useful version, it was only slightly more complex:
 base=$(gitXnormid.sh -c $1) || exit 1
 
+if [ -n "$2" ]; then
+    endpoint=$(gitXnormid.sh -c $2) || exit 1
+    if rev-tree $base $endpoint | grep -q $base:3; then
+        base=
+    else
+        rev-tree --edges $base $endpoint | sed 's/[a-z0-9]*:1//g' > $TMPCL
+    fi
+fi
 changelog $base
 rm $TMPCL $TMPCM
-- 
dwmw2
Previous: Petr Baudis
Message 2 of 2 in “Re: [PATCH] Pretty-print date in 'git log'”
  1. Petr BaudisApr 18, 2005
  2. David WoodhouseApr 18, 2005

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.