Re: git on Cygwin: Not a valid object name HEAD
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Aug 7, 2007, 17:11 UTC
- Message-ID
- <66DD7425-6073-4CA8-BF01-BF07213A4804@zib.de>
- In-Reply-To
- <20070807145825.GO21692@lavos.net>
On Aug 7, 2007, at 4:58 PM, Brian Downing wrote:
Show 5 quoted lines
> But it only half worked. Eventually it managed to corrupt itself > again, > and worse, the test suite was completely hopeless, as all shell > activity > still results in text-mode files.
Why that? Although I don't fully understand the description of the (no)binmode CYGWIN environment variable option [1], it sound to me as if shells might do the right thing by default.
But wait ... further down in the document there's more magic. (no)tty might be related as well.
My question is, is there any chance to handle the shell activity by setting the right CYGWIN options?
Here's another idea. Could git somehow check if the file operations work as expected and if not refuse to work. Git would at least have a well defined behaviour on cygwin, independently of the weird binmode/textmode stuff. Either it works, or it tells that it can't work.
Something like
fp = fopen ("tmp-test", "w"); /* no b */ fprintf (fp, "\n"); fclose (fp)
fp = fopen (tmp-test", "rb"); /* with b */ if (freads returns crap) die;
I checked a couple of cygwin installations on our machines and the results are quite scary. Some have all binmode, some have all textmode, and some have some parts mounted as binmode and other as textmode. I'd not dare to recommend using git on these machines.
Steffen
[1] http://www.cygwin.com/cygwin-ug-net/using-cygwinenv.html