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

Re: [RFC 4/6] git-check-attr: Normalize paths

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Aug 7, 2011, 04:32 UTC
Message-ID
<4E3E1548.3080502@alum.mit.edu>
In-Reply-To
<7vaabn52bb.fsf@alter.siamese.dyndns.org>
On 08/05/2011 05:02 PM, Junio C Hamano wrote:
Show 13 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>> If I understand you correctly, the use of some API routines requires a
>> chdir by the caller (i.e., the surrounding application) *before* calling
>> into the routine.  This is certainly a bit cleaner than the library
>> chdiring itself, but it is still unusable in a multithreaded context.
> 
> Why?
> 
> Presumably you know what your threads are doing, so if you take input from
> the end user after you started the environment, you will be doing the
> prefix discovery and pathspec prefixing on the entry and prefix stripping
> upon output but do not have to (and should not be doing) chdir at all.

I must have misunderstood your earlier message. Indeed, if none of the git functions that one would want to libify require that CWD==project root, then all is OK.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Junio C HamanoNext: Michael Haggerty
Message 11 of 15 in “[RFC 0/6] git-check-attr should work for relative paths”
  1. Michael HaggertyJul 28, 2011
  2. 1/6 git-check-attr: test that no output is written to stderrMichael Haggerty, Jul 28, 2011
  3. 2/6 git-check-attr: Demonstrate problems with unnormalized pathsMichael Haggerty, Jul 28, 2011
  4. 3/6 git-check-attr: Demonstrate problems with relative pathsMichael Haggerty, Jul 28, 2011
  5. 4/6 git-check-attr: Normalize pathsMichael Haggerty, Jul 28, 2011
  6. Junio C HamanoAug 2, 2011
  7. Michael HaggertyAug 4, 2011
  8. Junio C HamanoAug 4, 2011
  9. Michael HaggertyAug 5, 2011
  10. Junio C HamanoAug 5, 2011
  11. Michael HaggertyAug 7, 2011
  12. 5/6 test-path-utils: Add subcommand "absolute_path"Michael Haggerty, Jul 28, 2011
  13. 6/6 test-path-utils: Add subcommand "prefix_path"Michael Haggerty, Jul 28, 2011
  14. Junio C HamanoAug 2, 2011
  15. Michael HaggertyAug 4, 2011

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.