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

[PATCh] jit-trackdown

From
David Greaves <david@dgreaves.com>
Date
Apr 29, 2005, 16:03 UTC
Message-ID
<42725AB8.5090501@dgreaves.com>
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
Next: Junio C Hamano
Message 1 of 4 in “jit-trackdown”
  1. jit-trackdownDavid Greaves, Apr 29, 2005
  2. Junio C HamanoApr 29, 2005
  3. Daniel BarkalowApr 29, 2005
  4. Junio C HamanoApr 29, 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.