All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: Junio C Hamano <junkio@cox.net>
Cc: GIT Mailing Lists <git@vger.kernel.org>
Subject: [PATCh] jit-trackdown
Date: Fri, 29 Apr 2005 17:03:04 +0100	[thread overview]
Message-ID: <42725AB8.5090501@dgreaves.com> (raw)

Hi Junio

Excellent tool :)
Should really be cg-trackdown

David


This patch allows the use of symbolic commits from Cogito's
.git/refs/heads and tags structure eg:
  jit-trackdown HEAD etc/db/schema.sql
or
  jit-trackdown v3.2 etc/db/schema.sql


Signed-off-by: David Greaves <david@dgreaves.com>
---


--- jit-trackdown.orig  2005-04-29 16:57:40.278707704 +0100
+++ jit-trackdown       2005-04-29 16:47:16.495483693 +0100
@@ -1,6 +1,8 @@
 #!/bin/sh

 # Usage: jit-trackdown <commit> paths...
+# <commit> can be the symbolic name HEAD
+# or a tag or head identifier.

 tmp=.jit-trackdown.$$
 hits=$tmp-hits
@@ -10,6 +12,14 @@
 tty -s || to_tty=:

 head="$1"
+if [ $head == "HEAD" ]; then
+  head=$(cat .git/HEAD)
+elif [ -f .git/refs/tags/$head ]; then
+  head=$(cat .git/refs/tags/$head)
+elif [ -f .git/refs/heads/$head ]; then
+  head=$(cat .git/refs/heads/$head)
+fi
+
 shift
 rev-list "$head" |
 while read commit


             reply	other threads:[~2005-04-29 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 16:03 David Greaves [this message]
2005-04-29 18:47 ` [PATCh] jit-trackdown Junio C Hamano
2005-04-29 21:40   ` Daniel Barkalow
2005-04-29 22:09     ` Junio C Hamano

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=42725AB8.5090501@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.