git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] cg-log: make -r id:id show the given id instead of nothing
Date: Fri, 20 May 2005 17:04:00 +0200	[thread overview]
Message-ID: <20050520150400.GC27395@diku.dk> (raw)

If cg-log is passed -r cogito-0.10 -r cogito-0.10 no log entries are
shown. This patch make it show the log for the given ID.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

Index: cg-log
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cg-log  (mode:100755)
+++ uncommitted/cg-log  (mode:100755)
@@ -113,6 +113,9 @@
 if [ "$log_end" ]; then
 	id1="$(commit-id $log_start)" || exit 1
 	id2="$(commit-id $log_end)" || exit 1
+	if [ "$id1" = "$id2" ]; then
+		id1=$(git-cat-file commit $id1 | sed -n '/^parent /,0s/parent //p')
+	fi
 	revls="git-rev-tree $id2 ^$id1"
 	revsort="sort -rn"
 	revfmt="git-rev-tree"
-- 
Jonas Fonseca

             reply	other threads:[~2005-05-20 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 15:04 Jonas Fonseca [this message]
2005-05-29 12:19 ` [PATCH] cg-log: make -r id:id show the given id instead of nothing Petr Baudis
2005-05-29 13:07   ` Jonas Fonseca

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=20050520150400.GC27395@diku.dk \
    --to=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /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).