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/