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

Re: [PATCH] cvsserver: Make always-binary mode a config file option

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Mar 1, 2007, 09:13 UTC
Message-ID
<46a038f90703010113o256f19a2qb1c16f4c85e5bd1c@mail.gmail.com>
In-Reply-To
<200703010840.54377.andyparkins@gmail.com>
On 3/1/07, Andy Parkins <andyparkins@gmail.com> wrote:
Show 9 quoted lines
> On Wednesday 2007 February 28 23:40, Martin Langhoff wrote:
>
> > I guess what I mean is that the common case on windows is going to be
> > for users who want their binary files un-corrupted, and their text
> > files newline-converted.
>
> Given that windows editors/tools generally cope quite well with UNIX line
> endings, the common case could well be that no one cares that the new line
> conversion isn't happening (it's certainly the case for me).

Well... the guys working on the MinGW port of git have railroaded us with the opposite position. If it's going to work in Windows, you better accept it has to handle newline conversion correctly or it's broken...

...
Show 6 quoted lines
> > I agree with the idea of doing something smart with -kb flags, but
> > this is not a good move. For the common case among Windows TortoiseCVS
> > users, the switch proposed introduces the ability to switch between
> > one broken mode to another broken mode.
>
> I don't understand.  What is broken about it?

The interesting case to fix this for is a mixed binary and text repo with windows users wanting newline conversion (if they really don't, they can tell TortoiseCVS as much). For that scenario, current behaviour is broken (binaries get mangled), and setting -kb on everything breaks newline conversion.

And that scenario can only be addressed sending appropriate flags for each file, not with a blanket switch.

>  As you say - both modes are broken, so
> supplying a switch isn't crazy because one broken mode might suit better than
> another.

Except that it's not that hard to do something better -- I was hoping to prep a patch today, but things got frantic at the office.

> I think I'm missing something that you are worrying about and that I haven't
> noticed.  Does -kb do something that I'm not aware of?  Is there a more
> correct way of telling the client that a file is binary?

Just that I think it's easy enough to implement something that sets -k mode on file extension, which is actually _much_ better and makes the blanket setting pointless. And perhaps we can get binary autodetection working well but accepting overrides.

cheers,
martin
Previous: Andy ParkinsNext: Andy Parkins
Message 9 of 17 in “git-cvsserver and binary files”
  1. Andy ParkinsFeb 22, 2007
  2. Added "-kb" to all the entries lines sent to the clientAndy Parkins, Feb 22, 2007
  3. Junio C HamanoFeb 22, 2007
  4. cvsserver: Make always-binary mode a config file optionAndy Parkins, Feb 27, 2007
  5. Martin LanghoffFeb 28, 2007
  6. Andy ParkinsFeb 28, 2007
  7. Martin LanghoffFeb 28, 2007
  8. Andy ParkinsMar 1, 2007
  9. Martin LanghoffMar 1, 2007
  10. Andy ParkinsMar 1, 2007
  11. Junio C HamanoMar 1, 2007
  12. Junio C HamanoMar 1, 2007
  13. Junio C HamanoMar 1, 2007
  14. Andy ParkinsMar 1, 2007
  15. Karl HasselströmMar 1, 2007
  16. cvsserver: Make always-binary mode a config file optionAndy Parkins, Feb 27, 2007
  17. Junio C HamanoFeb 27, 2007

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.