Pamac build AUR waterfox: is there a way to make the git clone incremental?

The AUR waterfox-classic-kpe gets an update roughly every month.

Each time during the monthly build (started from pamac) the whole source gets cloned into /var/tmp/pamac-build-user via git from github. That’s 5 GB of source being downloaded each time.

It takes time and it’s inefficient and as far as my understanding of git goes, it’s somewhat contrary to the essential feature of being able to keep local copies of a repo up to date by doing small incremental fetches from the repo.

Is there a way to make pamac reuse the local copy of the waterfox repo from the previous build and just let git update?

Pamac might have cleaned it’s build files.

I don’t know if it has a timer for it, but it can be done automatiaclly by going in Pamac Settings -> AUR -> Clean Build Files.

If it still contains the build files, it should re-use the sources it found before. Not sure how other AUR helpers handle git sources. It might simply be how alpm handles it on the backend.

All the build files still appear to be there. Four days have gone by since the last build.

I assume the old build files get cleaned/deleted directly before the new build.

The settings in pamac.conf don’t appear to be relevant in this issue.
Some related options are set like this:
KeepBuiltPkgs enabled
KeepNumPackages = 3
## Remove only the versions of uninstalled packages when clean cache: #OnlyRmUninstalled

OnlyRmUninstalled only affects the built packages, not the build files, right?

I’ll have a look at alpm.

While looking at PKGBUILD from the last build I saw this line:

options=('!emptydirs' '!makeflags' 'zipman')

The !emptydirs sounds as it could have something to do with my problem.

As far as the info in PKGBUILD - ArchWiki goes, the ! should switch the option off.
But apparently emptydirs just specifies whether empty dirs in the build result should be removed or not.

So this doesn’t help.