On Wed, Aug 08, 2007 at 12:46:49AM +0200, Steffen Prohaska wrote:In addition to all the other stuff discussed, I believe you also need to worry about the binaryness of stdin and stdout. Looking at: http://www.cygwin.com/cygwin-ug-net/using-textbinary.html I think this can be achieved by putting something like: setmode(0, O_BINARY); setmode(1, O_BINARY); at the start of git's main(). When I was trying to get this to work, I did this as well as fixing up open() and fopen() calls as has already been discussed. What got me to quit, however, was that I never found a decent way to make the Git shell scripts binary safe, and enough of the system was in shell as to make it pretty much useless for everyday use. Looking at the examples on the above page: To illustrate the various rules, we provide scripts to delete CRs from files by using the tr program, which can only write to standard output. The script #!/bin/sh # Remove \r from the file given as argument tr -d '\r' < "$1" > "$1".nocr will not work on a text mounted systems because the \r will be reintroduced on writing. However scripts such as #!/bin/sh # Remove \r from the file given as argument tr -d '\r' | gzip | gunzip > "$1".nocr work fine. In the first case (assuming the pipes are binary) we rely on gunzip to set its output to binary mode, possibly overriding the mode used by the shell. was all it took to convince me this was probably a fool's errand. I wound up fixing our software so it would build on a binary mount, which I decided was a much more sane solution. -bcd - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| David | sdhci: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter - disabling IRQ |
| H. Peter Anvin | Re: Reiser4. BEST FILESYSTEM EVER? I need help. |
| Alan Cox | [PATCH 01/20] tty: Introduce a tty_port common structure |
git: | |
| Johannes Schindelin | Re: git on MacOSX and files with decomposed utf-8 file names |
| Avery Pennarun | Re: Considering teaching plumbing to users harmful |
| Mark Levedahl | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Junio C Hamano | Re: tracking repository |
| Richard Stallman | Real men don't attack straw men |
| Tony Abernethy | Re: What is our ultimate goal?? |
| Siju George | This is what Linus Torvalds calls openBSD crowd |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Brandon S. Allbery | Re: mkdir says "no space left on device" and more problems... |
| Paul Douglas Page | Where is mkfs? |
| Desmond A. Kirkpatrick | ATI GUP bug with Linux 'tickler' |
