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

Re: binary safe?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Nov 4, 2005, 21:22 UTC
Message-ID
<46a038f90511041322x1d9f7a50ndafe724c2e8d368b@mail.gmail.com>
In-Reply-To
<20051104165419.GA12145@old.davidb.org>
On 11/5/05, David Brown <git@davidb.org> wrote:
Show 8 quoted lines
> On Fri, Nov 04, 2005 at 12:00:54PM +1300, Martin Langhoff wrote:
>
> > Yes it works, and cvsimport -k will do the right thing for you.
>
> Unless it has changed from 0.99.9b, 'cvsimport -k' will very much scramble
> some binary files.  '-k' passes the '-kk' option which causes CVS to strip
> the keywords down.  It needs to pass -ko through if you want it to be able
> to handle binary files.

There is a misunderstanding here. We don't pass '-kk' to the cvs utility -- we pass it at the protocol level. Strangely enough, when passing ko we were getting broken files, and when passing kk we got all the files correctly. I explored and tested this quite a bit when I added the flag, and explicitly tested it with files that _would_ get broken with cvs update -kk.

To recap: my main test repository has a lot of binary files, files that do get broken if I do a cvs checkout with -kk. git-cvsimport gets them right with its -k parameter. Don't ask me why, though: the cvs protocol is really messy, and I suspect that part of the -kk option is being 'implemented' on the client side.

(That being said, if you have a case where git-cvsimport is doing the wrong thing, let me know!)

> However, since CVS (RCS really) can remember the state of this flag, it
> does work to  'cvs admin -ko filename' beforehand, and then do the
> cvsimport without the '-k' option.

Yes, but a repo you don't control, where people are using keywords, means thatyou need to do -kk to kill the keywords or your imported files are going to have a horrid amount of noise in them.

cheers,
martin
Previous: David BrownNext: David Brown
Message 5 of 9 in “binary safe?”
  1. Randal L. SchwartzNov 3, 2005
  2. Junio C HamanoNov 3, 2005
  3. Martin LanghoffNov 3, 2005
  4. David BrownNov 4, 2005
  5. Martin LanghoffNov 4, 2005
  6. David BrownNov 4, 2005
  7. Linus TorvaldsNov 3, 2005
  8. Chris WedgwoodNov 4, 2005
  9. Nick HengeveldNov 3, 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.