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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:45

Michael Haggerty [off-list ref] 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.

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

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:51:45

On 08/05/2011 05:02 PM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help