google / zoekt

Fast trigram based code search
1.7k stars 113 forks source link

Github repos no longer get updated #106

Closed dziemba closed 4 years ago

dziemba commented 4 years ago

We're using zoekt-indexserver with a GithubOrg mirror_config. Everything else (especially branches, origins etc.) is not changed from the default values.

Commit 47ff3037 changed how git fetching is configured.

Repos that are cloned from github get indexed correctly initially, but then the git fetch calls do not fetch the required refs anymore.

Previous behavior:

$ git clone --bare https://github.com/dziemba/dotfiles.git \
  --config "remote.origin.fetch=+refs/heads/*:refs/heads/*"
[...]
$ cd dotfiles.git
$ git fetch -v
From https://github.com/dziemba/dotfiles
 = [up to date]      master     -> master

Current behavior:

$ git clone --bare https://github.com/dziemba/dotfiles.git
[...]
$ cd dotfiles.git
$ git fetch -v
From https://github.com/dziemba/dotfiles
 * branch            HEAD       -> FETCH_HEAD

The behavior is the same with git 2.20.0 and 2.24.0.

I'm not a git expert, please let me know if you need more information.

hanwen commented 4 years ago

this sounds believable. We probably have to add git-config

"remote.origin.fetch=+refs/heads/:refs/heads/"

somewhere as a step after cloning.

dziemba commented 4 years ago

Thank you for the fix!

hanwen commented 4 years ago

can you confirm that it works as expected?

dziemba commented 4 years ago

Yes, it works fine :+1: