Re: [PATCH v4 1/5] setup: add gentle version of read_gitfile

2015-04-25 Thread Junio C Hamano
Junio C Hamano writes: >> +switch (error_code) { >> +case 1: // failed to stat >> +case 2: // not regular file > > Please do not use C++ // comments. No need to resend for this; I'll locally amend. -- To unsubscribe from this list: send the line "unsubscribe g

Re: [PATCH v4 1/5] setup: add gentle version of read_gitfile

2015-04-25 Thread Junio C Hamano
Erik Elfström writes: > read_gitfile will die on most error cases. This makes it unsuitable > for speculative calls. Extract the core logic and provide a gentle > version that returns NULL on failure. > > The first usecase of the new gentle version will be to probe for > submodules during git cle

[PATCH v4 1/5] setup: add gentle version of read_gitfile

2015-04-25 Thread Erik Elfström
read_gitfile will die on most error cases. This makes it unsuitable for speculative calls. Extract the core logic and provide a gentle version that returns NULL on failure. The first usecase of the new gentle version will be to probe for submodules during git clean. Helped-by: Junio C Hamano Hel