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

Re: Creating own hierarchies under $GITDIR/refs ?

From
David Kastrup <dak@gnu.org>
Date
Feb 2, 2014, 11:19 UTC
Message-ID
<8761ox2240.fsf@fencepost.gnu.org>
In-Reply-To
<CACsJy8CdKRQ_au3QqVoUdedvPpkPh_2vodKJwLZ7VrrwRJSDXQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 12 quoted lines
> On Sun, Feb 2, 2014 at 5:37 PM, David Kastrup <dak@gnu.org> wrote:
>> in the context of an ongoing discussion on the Emacs developer list of
>> converting the Bzr repository of Emacs, one question (with different
>> approaches) is where to put the information regarding preexisting Bazaar
>> revision numbers and bug tracker ids: those are not present in the
>> current Git mirror.
>>
>> Putting them in the commit messages would require a full history
>> rewrite, and if some are missed in the process, this cannot be fixed
>> afterwards.
>
> What do you need them for?

Resolving references typically found in commit messages. Also establishing correlation to bug issue numbers.

> Perhaps putting everything in a file, maybe sorted by SHA-1, would
> suffice? It should not be too hard to write a script to map bug
> tracker id to a commit id.

We are not talking about "it should not be too hard". We are talking about "obvious and reliable enough to render a complete history rewrite pointless".

> 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.

Rest assured that the "standard" answers have been beat to death in the Emacs developer list thread several times over.

So I'm more interested in getting actual answers dealing with the question I have asked rather than suggestions for questions that would be easier to answer.

Since Git has a working facility for references that is catered to do exactly this kind of mapping and already _does_, it seems like a convenient path to explore.

It apparently even already works with --decorate:
commit c92b1fb3ad8514f08fc4cec531211717955a5c29 (tag: release/2.19.1-1, origin/release/unstable, tag: refs/bzr/r15000)
Author: Phil Holmes <mail@philholmes.net>
Date:   Sun Jan 19 15:01:48 2014 +0000
    Release: update news.
-- 
David Kastrup
Previous: Duy NguyenNext: John Keeping
Message 3 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.