# Using overlay filesystem for "other" files idea

3 messages from 2010-12-22 to 2010-12-23. Participants: Evgeniy Ivanov, Tomas Carnecky.
Thread: https://gitlist.dev/t/26126

## Evgeniy Ivanov, 2010-12-22 23:02

Subject: Using overlay filesystem for "other" files idea
Message-ID: <AANLkTi=f2MXoWE_Dx_thWb3VXGu-V-9cJAC8F_RzGAg=@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3Df2MXoWE_Dx_thWb3VXGu-V-9cJAC8F_RzGAg%3D%40mail.gmail.com

```
Hello,

I got following idea.

If different branches seriously differ and you switch branches, then
it's more likely you will loose most part of build files (e.g. when
run build).
Also in projects that may have some bugs in build system (e.g. buggy
makefiles) there is a chance you will not get clean build environment.
E.g. somebody forgot to add include file as dependency in Makefile ---
oops, you're in trouble.
Even without bugs in build system, some temp files are overwritten
each time you run build for a custom branch.

I think using overlays for other files can help much to solve this
issue. You can have git repository in regular directory (like now) and
overlay fs mounted over this repository (for each branch its own
overlay).
Another benefit is clearing source tree after build.

What do you think, guys? If it sounds good, I could work on this,
maybe even on my work.


-- 
Evgeniy Ivanov

```

## Tomas Carnecky, 2010-12-23 05:27

Subject: Re: Using overlay filesystem for "other" files idea
Message-ID: <4D12DDD5.4050103@dbservice.com>
URL: https://gitlist.dev/e/4D12DDD5.4050103%40dbservice.com
In-Reply-To: <AANLkTi=f2MXoWE_Dx_thWb3VXGu-V-9cJAC8F_RzGAg=@mail.gmail.com>

```
  On 12/23/10 12:02 AM, Evgeniy Ivanov wrote:
> Hello,
>
> I got following idea.
>
> If different branches seriously differ and you switch branches, then
> it's more likely you will loose most part of build files (e.g. when
> run build).
Use ccache.
> Also in projects that may have some bugs in build system (e.g. buggy
> makefiles) there is a chance you will not get clean build environment.
> E.g. somebody forgot to add include file as dependency in Makefile ---
> oops, you're in trouble.
Fix your Makefiles. Or run git clean, see below.
> Even without bugs in build system, some temp files are overwritten
> each time you run build for a custom branch.
>
> I think using overlays for other files can help much to solve this
> issue. You can have git repository in regular directory (like now) and
> overlay fs mounted over this repository (for each branch its own
> overlay).
> Another benefit is clearing source tree after build.

git clean -dfx.


Or use two different working trees. See contrib/workdir/git-new-workdir.

tom

```

## Evgeniy Ivanov, 2010-12-23 09:53

Subject: Re: Using overlay filesystem for "other" files idea
Message-ID: <AANLkTi=fW+spgi7YYSxEReMk4ZveEt2=Mb_1majKi6GJ@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DfW%2Bspgi7YYSxEReMk4ZveEt2%3DMb_1majKi6GJ%40mail.gmail.com
In-Reply-To: <4D12DDD5.4050103@dbservice.com>

```
Thank you Tom, that's what I wanted.

On Thu, Dec 23, 2010 at 8:27 AM, Tomas Carnecky <tom@dbservice.com> wrote:
>  On 12/23/10 12:02 AM, Evgeniy Ivanov wrote:
>>
>> Hello,
>>
>> I got following idea.
>>
>> If different branches seriously differ and you switch branches, then
>> it's more likely you will loose most part of build files (e.g. when
>> run build).
>
> Use ccache.
>>
>> Also in projects that may have some bugs in build system (e.g. buggy
>> makefiles) there is a chance you will not get clean build environment.
>> E.g. somebody forgot to add include file as dependency in Makefile ---
>> oops, you're in trouble.
>
> Fix your Makefiles. Or run git clean, see below.
>>
>> Even without bugs in build system, some temp files are overwritten
>> each time you run build for a custom branch.
>>
>> I think using overlays for other files can help much to solve this
>> issue. You can have git repository in regular directory (like now) and
>> overlay fs mounted over this repository (for each branch its own
>> overlay).
>> Another benefit is clearing source tree after build.
>
> git clean -dfx.
>
>
> Or use two different working trees. See contrib/workdir/git-new-workdir.
>
> tom
>
>
>



-- 
Evgeniy Ivanov

```
