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

Re: cvs revision number -> git commit name?

From
HFHallvard B Furuseth <h.b.furuseth@usit.uio.no>
Date
Jan 27, 2010, 17:47 UTC
Message-ID
<hbf.20100127jjbx@bombur.uio.no>
In-Reply-To
<201001270043.44614.johan@herland.net>
Johan Herland writes:
>On Tuesday 26 January 2010, Aaron Crane wrote:
>> One thing to be aware of (beyond the need to run grep to convert old
>> CVS revision numbers to Git commit IDs)

which sounds like a job for a small tool, maybe aliased in .git/config. 'git cvsinfo file.c 1.23' or 'git cvsinfo [file.c] <git-commitname>' --> output cvs and git commit info (cvs rev, commit, log message, etc). Or maybe it shouldn't be cvs-specific.

Show 7 quoted lines
>> is that there's a good chance
>> the mapping file will pollute the results of `git grep` for some
>> tasks.  (We've put the mapping file into our repo, where it's easy to
>> find.)  I'm considering gzipping the mapping file as a workaround;
>> that would mean our users will need to use zgrep (or equivalent) to
>> look up CVS revision numbers, which may or may not be a problem in
>> your situation.

Thanks for the tip. Zipping sounds good. In particular combined with the grepping tool above. If the unzipping gets slow, cvsinfo --unpack could always put a bunzipped file in .git/cvsinfo.txt or something.

Show 5 quoted lines
> You could consider adding the CVS revision numbers as notes (see "git help 
> notes" in >= v1.6.6) to the corresponding commits. Then they don't pollute 
> the commit messages, but instead live in a separate, but parallel hierarchy 
> that can be easily pulled in when you need to reference them (e.g. 
> GIT_NOTES_REF="refs/" git log).

Thanks, looks better than munging the log. Though with one common weakness - should likely omit noting mass commits, since they'd clutter what 'git log' displays too much. Of course, either could used combined with a mapping table.

-- 
Hallvard
Previous: Johan HerlandNext: Johan Herland
Message 6 of 7 in “cvs revision number -> git commit name?”
  1. Hallvard B FurusethJan 26, 2010
  2. Aaron CraneJan 26, 2010
  3. Johan HerlandJan 26, 2010
  4. Junio C HamanoJan 27, 2010
  5. Johan HerlandJan 27, 2010
  6. Hallvard B FurusethJan 27, 2010
  7. Johan HerlandJan 27, 2010

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.