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

Re: Git Cygwin - unable to create any repository - help!

From
PUPaul Umbers <paul.umbers@gmail.com>
Date
Jan 17, 2008, 18:37 UTC
Message-ID
<a5eb9c330801171037v333becc2lbc5873383d07a358@mail.gmail.com>
In-Reply-To
<20080116234527.GA3499@steel.home>

Made the changes you specify below & re-ran "make install". Attached is the log from the latest strace.

Incidentally, I've tried this on two other machines at work with the same results. The steps to reproduce are annoyingly simple: download cygwin installer & execute (accept all defaults), select the packages specified for the binary windows install on the git wiki, try to create a git repository and add files. Frustrating - especially since my desktop at my last job worked just fine.

Paul

On Jan 16, 2008 4:45 PM, Alex Riesen <raa.lkml@gmail.com> wrote: SNIP

Show 39 quoted lines
>
> Could you locate move_temp_to_file and make it unconditionally rename
> the tempfile into target sha1 file? It should become something like that:
>
> int move_temp_to_file(const char *tmpfile, const char *filename)
> {
>         int ret = link_temp_to_file(tmpfile, filename);
>
>         /*
>          * Coda hack - coda doesn't like cross-directory links,
>          * so we fall back to a rename, which will mean that it
>          * won't be able to check collisions, but that's not a
>          * big deal.
>          *
>          * The same holds for FAT formatted media.
>          *
>          * When this succeeds, we just return 0. We have nothing
>          * left to unlink.
>          */
>         if (!rename(tmpfile, filename))
>                 return 0;
>         ret = errno;
>         unlink(tmpfile);
>         if (ret) {
>                 if (ret != EEXIST) {
>                         return error("unable to write sha1 filename %s: %s\n", filename, strerror(ret));
>                 }
>                 /* FIXME!!! Collision check here ? */
>                 return error("failed to write sha1 filename %s: %s\n", filename, strerror(ret));
>         }
>
>         return 0;
> }
>
> Does someone know, why this function seem to return 0 (success) on
> something which looks like an SHA1 collision? And destroy the
> tempfile, even though it is not moved anywhere.
>
>
-- 
Computer Science is no more about computers than astronomy is about telescopes.
--- Edsger W. Dijkstra

Paul Umbers MSc MBCS MIAP
paul.umbers@gmail.com
Previous: Alex RiesenNext: Linus Torvalds
Message 26 of 39 in “Git Cygwin - unable to create any repository - help!”
  1. Paul UmbersJan 14, 2008
  2. Alex RiesenJan 14, 2008
  3. Paul UmbersJan 14, 2008
  4. Alex RiesenJan 15, 2008
  5. Paul UmbersJan 15, 2008
  6. Alex RiesenJan 15, 2008
  7. Paul UmbersJan 15, 2008
  8. Alex RiesenJan 15, 2008
  9. Paul UmbersJan 15, 2008
  10. Alex RiesenJan 15, 2008
  11. Paul UmbersJan 15, 2008
  12. Alex RiesenJan 15, 2008
  13. Robin RosenbergJan 15, 2008
  14. Alex RiesenJan 16, 2008
  15. Paul UmbersJan 16, 2008
  16. Junio C HamanoJan 16, 2008
  17. Paul UmbersJan 16, 2008
  18. Alex RiesenJan 16, 2008
  19. Paul UmbersJan 16, 2008
  20. Alex RiesenJan 16, 2008
  21. Paul UmbersJan 16, 2008
  22. Alex RiesenJan 16, 2008
  23. Alex RiesenJan 16, 2008
  24. Paul UmbersJan 16, 2008
  25. Alex RiesenJan 16, 2008
  26. Paul UmbersJan 17, 2008
  27. Linus TorvaldsJan 17, 2008
  28. Johannes SchindelinJan 17, 2008
  29. Paul UmbersJan 17, 2008
  30. Linus TorvaldsJan 17, 2008
  31. Pascal ObryJan 17, 2008
  32. Johannes SchindelinJan 17, 2008
  33. Pascal ObryJan 17, 2008
  34. Paul UmbersJan 17, 2008
  35. Alex RiesenJan 17, 2008
  36. Nicholas WourmsJan 17, 2008
  37. Alex RiesenJan 17, 2008
  38. Paul UmbersJan 16, 2008
  39. Pascal ObryJan 15, 2008

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.