Mail Archives: djgpp-workers/2000/12/17/06:41:53
On Sun, 17 Dec 2000, Tim Van Holder wrote:
> > If a repository is on a Unix box, it means you need to write files in
> > binary mode when checking them out.
> Not if all files on it are simple sources; then using text mode would be
> equally acceptable. It's basically the same situation as a local
> repository, with a slightly better reason for using binary-only.
That's exactly what I meant: when the repository is on a remote machine,
it makes more sense to favor binary writes.
> The case in point would be me getting the sources from anonymous CVS.
> I can't commit, so I need to prepare a diff to send to the maintainers.
> If I changes DOS-style files too, my diff would need to be binary-based
> to preserve EOL conventions in all files (since it would probably be
> applied on a Linux/Unix box).
In that case, generating the diffs with "diff --binary" is always the
right thing to do.
But this problem doesn't have a good solution anyway. For starters,
when you send DOS-style diffs via email, you cannot be sure it ends up
with DOS EOLs on the other end, because many mailers strip CRs from
CR-LF pairs. You need to send the diffs as binary attachments (and
annoy the recipient), or ask the maintainer to run the result through
unix2dos or some such.
> I was thinking of using the same options as WinCVS does (--lf and --crlf),
> but what would be a good name for the mod DJ suggested (binary write,
> text read)? --maybe-crlf?
"--maybe" is too vague IMHO. How about "--read=text"?
- Raw text -