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

Re: Creating own hierarchies under $GITDIR/refs ?

From
John Keeping <john@keeping.me.uk>
Date
Feb 2, 2014, 12:24 UTC
Message-ID
<20140202122432.GC29976@serenity.lan>
In-Reply-To
<87wqhdzqo3.fsf@fencepost.gnu.org>
On Sun, Feb 02, 2014 at 12:42:52PM +0100, David Kastrup wrote:
Show 22 quoted lines
> John Keeping <john@keeping.me.uk> writes:
> 
> > On Sun, Feb 02, 2014 at 12:19:43PM +0100, David Kastrup wrote:
> >> Duy Nguyen <pclouds@gmail.com> writes:
> >> 
> >> > The file is for past commits only.
> >> 
> >> > New commits can contain these info in their messages.
> >> 
> >> If it's not forgotten.  Experience shows that things like issue numbers
> >> have a tendency to be omitted, and then they stay missing.
> >> 
> >> At any rate, this is exactly the kind of stuff that tags are useful for,
> >> except that using them for all that would render the "tag space"
> >> overcrowded.
> >
> > Actually, I would say this is exactly the sort of thing notes are for.
> >
> > git.git uses them to map commits back to mailing list discussions:
> 
> But that's the wrong direction.  What is needed in the Emacs case is
> mapping the Bazaar reference numbers (and bug numbers) to commits.
Ah, OK.  I hadn't quite read carefully enough.

I actually wonder if you could do this with notes and git-grep; for example:

    git grep -l keeping.me.uk refs/notes/amlog |
    sed -e 's/.*://' -e 's!/!!g'

That should be relatively efficient since you're only looking at the current notes tree.

Show 12 quoted lines
> While it is true that the history rewriting approach would not deliver
> this either (short of git log --grep with suitable patterns), I was
> looking for something less of a crutch here.
> 
> > Notes aren't fetch by default, but it's not hard for those interested
> > to add a remote.*.fetch line to their config.
> 
> If we are talking about measures everybody has to actively take before
> getting access to functionality, this does not cross the convenience
> threshold making it a solution preferred over others.  But it's probably
> feasible to configure a fetch line doing this that will get cloned when
> first cloning a repository.

I'm assuming you'll need some form of tool (at least a script) to manipulate this feature; it wouldn't be too hard for that to set this up the first time it's run.

Previous: David KastrupNext: Jed Brown
Message 6 of 11 in “Creating own hierarchies under $GITDIR/refs ?”
  1. David KastrupFeb 2, 2014
  2. Duy NguyenFeb 2, 2014
  3. David KastrupFeb 2, 2014
  4. John KeepingFeb 2, 2014
  5. David KastrupFeb 2, 2014
  6. John KeepingFeb 2, 2014
  7. Jed BrownFeb 2, 2014
  8. Duy NguyenFeb 2, 2014
  9. David KastrupFeb 2, 2014
  10. Andreas SchwabFeb 2, 2014
  11. Jeff KingFeb 2, 2014

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.