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

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
Previous: Sebastian SchuberthNext: Mark Levedahl
Message 8 of 60 in “git on Cygwin: Not a valid object name HEAD”
  1. Sebastian SchuberthAug 7, 2007
  2. Johannes SchindelinAug 7, 2007
  3. Sebastian SchuberthAug 7, 2007
  4. Sebastian SchuberthAug 7, 2007
  5. Shawn O. PearceAug 7, 2007
  6. Brian DowningAug 7, 2007
  7. Sebastian SchuberthAug 7, 2007
  8. Steffen ProhaskaAug 7, 2007
  9. Mark LevedahlAug 7, 2007
  10. Steffen ProhaskaAug 7, 2007
  11. Linus TorvaldsAug 7, 2007
  12. Junio C HamanoAug 7, 2007
  13. Linus TorvaldsAug 8, 2007
  14. Steffen ProhaskaAug 7, 2007
  15. cygwin: added fopen "b" and open O_BINARY to support cygwin's textmodeSteffen Prohaska, Aug 7, 2007
  16. tests: added d2u to have unix style testfiles even in textmodeSteffen Prohaska, Aug 7, 2007
  17. Linus TorvaldsAug 8, 2007
  18. Steffen ProhaskaAug 8, 2007
  19. Steffen ProhaskaAug 7, 2007
  20. Brian DowningAug 8, 2007
  21. Steffen ProhaskaAug 8, 2007
  22. Junio C HamanoAug 7, 2007
  23. Sebastian SchuberthAug 8, 2007
  24. Mark LevedahlAug 8, 2007
  25. Steffen ProhaskaAug 8, 2007
  26. Mark LevedahlAug 8, 2007
  27. Johannes SchindelinAug 8, 2007
  28. Steffen ProhaskaAug 8, 2007
  29. Steffen ProhaskaAug 8, 2007
  30. Steffen ProhaskaAug 8, 2007
  31. Mark LevedahlAug 8, 2007
  32. Steffen ProhaskaAug 9, 2007
  33. Marius Storm-OlsenAug 9, 2007
  34. Steffen ProhaskaAug 9, 2007
  35. Marius Storm-OlsenAug 9, 2007
  36. Johannes SchindelinAug 9, 2007
  37. Marius Storm-OlsenAug 9, 2007
  38. Steffen ProhaskaAug 9, 2007
  39. Johannes SchindelinAug 8, 2007
  40. Steffen ProhaskaAug 9, 2007
  41. Torgil SvenssonAug 10, 2007
  42. Steffen ProhaskaAug 10, 2007
  43. Johannes SchindelinAug 10, 2007
  44. Steffen ProhaskaAug 10, 2007
  45. Torgil SvenssonAug 10, 2007
  46. Steffen ProhaskaAug 11, 2007
  47. Johannes SchindelinAug 13, 2007
  48. Torgil SvenssonAug 15, 2007
  49. Steffen ProhaskaAug 15, 2007
  50. David KastrupAug 15, 2007
  51. Steffen ProhaskaAug 15, 2007
  52. David KastrupAug 15, 2007
  53. Mark LevedahlAug 7, 2007
  54. Shawn O. PearceAug 15, 2007
  55. Mark LevedahlAug 15, 2007
  56. Mark LevedahlAug 15, 2007
  57. Steffen ProhaskaAug 15, 2007
  58. Mark LevedahlAug 16, 2007
  59. Steffen ProhaskaAug 16, 2007
  60. Mark LevedahlAug 16, 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.