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

Re: clone fails: Could not get the current working directory

From
JFJohn Freeman <jfreeman@cs.tamu.edu>
Date
Sep 22, 2008, 18:32 UTC
Message-ID
<48D7E4B7.3010109@cs.tamu.edu>
In-Reply-To
<48D6C822.7050602@cs.tamu.edu>

I have also tried copying the repo to my home directory on the remote Sun machine, and then cloning to my local machine. This works as expected.

Does anyone know why a call to getcwd() would fail?

I found this in some documentation on getcwd: http://www.opengroup.org/onlinepubs/009695399/functions/getcwd.html "If a program is operating in a directory where some (grand)parent directory does not permit reading, getcwd() may fail, as in most implementations it must read the directory to determine the name of the file. This can occur if search, but not read, permission is granted in an intermediate directory, or if the program is placed in that directory by some more privileged process (for example, login). Including the [EACCES] error condition makes the reporting of the error consistent and warns the application writer that getcwd() can fail for reasons beyond the control of the application writer or user. Some implementations can avoid this occurrence (for example, by implementing getcwd() using pwd, where pwd is a set-user-root process), thus the error was made optional."

Does anyone know for certain if this is true for Sun machines? Would it be possible to patch / introduce a macro that changes the use of getcwd() to a use of pwd, like the above documentation suggests?

- John
Previous: John Freeman
Message 12 of 12 in “clone fails: Could not get the current working directory”
  1. John FreemanSep 21, 2008
  2. Alex RiesenSep 23, 2008
  3. John FreemanSep 23, 2008
  4. Alex RiesenSep 23, 2008
  5. John FreemanSep 23, 2008
  6. Alex RiesenSep 23, 2008
  7. John FreemanSep 23, 2008
  8. Alex RiesenSep 24, 2008
  9. John FreemanSep 24, 2008
  10. Alex RiesenSep 24, 2008
  11. John FreemanSep 21, 2008
  12. John FreemanSep 22, 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.