git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>, git@vger.kernel.org
Subject: Re: [PATCH] Pretty-print date in 'git log'
Date: Mon, 18 Apr 2005 22:24:39 +1000	[thread overview]
Message-ID: <1113827080.5286.10.camel@localhost.localdomain> (raw)
In-Reply-To: <20050418102744.GK1461@pasky.ji.cz>

On Mon, 2005-04-18 at 12:27 +0200, Petr Baudis wrote:
> 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


  reply	other threads:[~2005-04-18 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DNPz9-0003lm-00@skye.ra.phy.cam.ac.uk>
     [not found] ` <1113808105.5286.1.camel@localhost.localdomain>
2005-04-18 10:27   ` [PATCH] Pretty-print date in 'git log' Petr Baudis
2005-04-18 12:24     ` David Woodhouse [this message]
2005-04-18  5:46 David Woodhouse
2005-04-18 19:02 ` Ray Lee
2005-04-18 19:57   ` Sanjoy Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1113827080.5286.10.camel@localhost.localdomain \
    --to=dwmw2@infradead.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=sanjoy@mrao.cam.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).