Re: [PATCH 07/11] files-backend: remove the use of git_path()

2017-02-14 Thread Duy Nguyen
On Tue, Feb 14, 2017 at 6:09 AM, Stefan Beller wrote: >> + >> + if (submodule) { >> + refs->submodule = xstrdup_or_null(submodule); > > drop the _or_null here? > > So in this patch we have either > * submodule set > * or gitdir/gitcommondir set > > which means that we exercise

Re: [PATCH 07/11] files-backend: remove the use of git_path()

2017-02-13 Thread Stefan Beller
> + > + if (submodule) { > + refs->submodule = xstrdup_or_null(submodule); drop the _or_null here? So in this patch we have either * submodule set * or gitdir/gitcommondir set which means that we exercise the commondir for regular repos. In the future when we want to be able

[PATCH 07/11] files-backend: remove the use of git_path()

2017-02-13 Thread Nguyễn Thái Ngọc Duy
Given $GIT_DIR and $GIT_COMMON_DIR, files-backend is now in charge of deciding what goes where. The end goal is to pass $GIT_DIR only. A refs "view" of a linked worktree is a logical ref store that combines two files backends together. (*) Not entirely true since strbuf_git_path_submodule() still