# Re: [PATCH 03/15] run-job: implement fetch job

2 messages from 2020-04-13 to 2020-04-13. Participants: Son Luong Ngoc, Derrick Stolee.
Thread: https://gitlist.dev/t/53215

## Son Luong Ngoc, 2020-04-13 13:15

Subject: Re: [PATCH 03/15] run-job: implement fetch job
Message-ID: <CAL3xRKew_RHbPbp0qSa7WcDbaMmMWWmBi_nvPbmKaSpVDJM08g@mail.gmail.com>
URL: https://gitlist.dev/e/CAL3xRKew_RHbPbp0qSa7WcDbaMmMWWmBi_nvPbmKaSpVDJM08g%40mail.gmail.com

```
Hi Derrick,

First of all, thanks a ton for upstreaming this.
Despite multiple complaints about re-implementing cron in git,
I see this as a huge improvement to git UX and it is very much welcome change.

> 3. By adding a new refspec "+refs/heads/*:refs/hidden/<remote>/*"
>    we can ensure that we actually load the new values somewhere in
>    our refspace while not updating refs/heads or refs/remotes. By
>    storing these refs here, the commit-graph job will update the
>    commit-graph with the commits from these hidden refs.
Ideally I think we want to let user configure which refs they want to
prefetch with the default behavior being prefecting all HEADS
available from remote.
Using Facebook's Mercurial extension
[RemoteFileLog](https://www.mercurial-scm.org/repo/hg/file/tip/hgext/remotefilelog/__init__.py#l31)
as a UX reference,
users should only prefetch the refs that they actually care about.

> 1. One downside of the refs/hidden pattern is that 'git log' will
>    decorate commits with twice as many refs if they appear at a
>    remote ref (<remote>/<ref> _and_ refs/hidden/<remote>/<ref>). Is
>    there an easy way to exclude a refspace from decorations? Should
>    we make refs/hidden/* a "special" refspace that is excluded from
>    decorations?
In git-log, there is
[--decorate-refs-exclude](https://git-scm.com/docs/git-log#Documentation/git-log.txt---decorate-refs-excludeltpatterngt)
which I think we can move into git-config as
`log.decorate-refs-exclude`?
If you let the `prefetch refs` be configurable as I suggested above, I
think it make sense to have the git-log exclusions being configurable
as well.

Cheers,
Son Luong.

```

## Derrick Stolee, 2020-04-13 14:14

Subject: Re: [PATCH 03/15] run-job: implement fetch job
Message-ID: <fb80f3e5-ea22-b9fe-5818-c915e5a15014@gmail.com>
URL: https://gitlist.dev/e/fb80f3e5-ea22-b9fe-5818-c915e5a15014%40gmail.com
In-Reply-To: <CAL3xRKew_RHbPbp0qSa7WcDbaMmMWWmBi_nvPbmKaSpVDJM08g@mail.gmail.com>

```
On 4/13/2020 9:15 AM, Son Luong Ngoc wrote:
> Hi Derrick,
> 
> First of all, thanks a ton for upstreaming this.
> Despite multiple complaints about re-implementing cron in git,
> I see this as a huge improvement to git UX and it is very much welcome change.
> 
>> 3. By adding a new refspec "+refs/heads/*:refs/hidden/<remote>/*"
>>    we can ensure that we actually load the new values somewhere in
>>    our refspace while not updating refs/heads or refs/remotes. By
>>    storing these refs here, the commit-graph job will update the
>>    commit-graph with the commits from these hidden refs.
> Ideally I think we want to let user configure which refs they want to
> prefetch with the default behavior being prefecting all HEADS
> available from remote.
> Using Facebook's Mercurial extension
> [RemoteFileLog](https://www.mercurial-scm.org/repo/hg/file/tip/hgext/remotefilelog/__init__.py#l31)
> as a UX reference,
> users should only prefetch the refs that they actually care about.

I will be sure to review this prior art before
submitting an update to this series.

>> 1. One downside of the refs/hidden pattern is that 'git log' will
>>    decorate commits with twice as many refs if they appear at a
>>    remote ref (<remote>/<ref> _and_ refs/hidden/<remote>/<ref>). Is
>>    there an easy way to exclude a refspace from decorations? Should
>>    we make refs/hidden/* a "special" refspace that is excluded from
>>    decorations?
> In git-log, there is
> [--decorate-refs-exclude](https://git-scm.com/docs/git-log#Documentation/git-log.txt---decorate-refs-excludeltpatterngt)
> which I think we can move into git-config as
> `log.decorate-refs-exclude`?
> If you let the `prefetch refs` be configurable as I suggested above, I
> think it make sense to have the git-log exclusions being configurable
> as well.

I was literally just working on exactly this when
your message arrived. I was going to name the config
option "log.decorateExclude".

Thanks,
-Stolee

```
