Re: [PATCH v3 15/25] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-02-28 Thread Duy Nguyen
On Thu, Feb 27, 2014 at 7:16 AM, Junio C Hamano wrote: >> + if (file_exists(path.buf)) { >> + if (strbuf_read_file(&data, path.buf, 0) <= 0) >> + die_errno(_("failed to read %s"), path.buf); > > Do we care about the case where we cannot tell if the file exists >

Re: [PATCH v3 15/25] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-02-26 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > If the file "$GIT_DIR/commondir" exists, it contains the value of > $GIT_COMMON_DIR. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > Documentation/gitrepository-layout.txt | 4 > setup.c| 38 > ---

[PATCH v3 15/25] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-02-18 Thread Nguyễn Thái Ngọc Duy
If the file "$GIT_DIR/commondir" exists, it contains the value of $GIT_COMMON_DIR. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/gitrepository-layout.txt | 4 setup.c| 38 -- strbuf.c | 8