Comments (6)
yeah, this could have been the go-git transition. The relevant code would be under gitindex, and there is an option BranchPrefix that should hold refs/heads/ . The prefix should not go into the actual branch name, afaict:
https://gerrit.googlesource.com/zoekt/+/f3e8b54db17ec67f8108123bac197194f51d1288/gitindex/git.go#342
maybe expandBranches doesn't behave as expected?
from zoekt.
Sven made a match which seems to work for us:
https://gerrit-review.googlesource.com/c/zoekt/+/137410
from zoekt.
can you tell me more about the failure mode? I can't reproduce the problem.
$ git clone --mirror https://gerrit.googlesource.com/zoekt
$ cd zoekt.git
$ git show-ref|grep master
e255527 refs/heads/master
$ zoekt-git-index --branches=master .
2017/11/05 14:03:11 finished /home/hanwen/.zoekt/gerrit.googlesource.com_zoekt_v14.00000.zoekt: 1261902 index bytes (overhead 3.4)
from zoekt.
That will work because the default -prefix is "refs/heads/".
Since we index Gerrit configurations (refs/meta/config) we need to set "-prefix" to an empty string or else we cannot index the "refs/meta/"-branches.
Pre go-git.v4 we could set -prefix to "" and it would still find and index a ref like "master". That way we could index both "master" (not "refs/heads/master") and "refs/meta/config", which was perfect for us.
Since go-git.v4, zoekt-git-index wont find "master" anymore with -prefix "", so we have to specify the full branch ref: "refs/heads/master" which clutters the UI (and I guess affect the searches).
I guess people that index refs/notes and similar namespaces will have the same problem.
from zoekt.
This problem is solved by this patch:
https://gerrit-review.googlesource.com/c/zoekt/+/137410
from zoekt.
fixed by e1a95db
from zoekt.
Related Issues (20)
- Feature: Directory listing HOT 1
- Change Bitbucket Default Clone URL HOT 1
- zoekt-mirror-gitiles doesn't delete stale repos.
- support exact match for definitions like `sym:^create$` HOT 1
- installation of zoekt-indexer fails HOT 4
- Make line reference format in url hash formattable HOT 6
- zoekt cannot list enough search results HOT 3
- git:// url in submodule trips up web template rendering
- Revive REST functionality with what conditions? HOT 6
- Q: Show context HOT 6
- zoekt-webserver: Work With Empty Index Directory HOT 1
- Problem when using ctags: "write |1: file already closed" HOT 2
- Occasional Invalid JSON From Ctags HOT 7
- zoekt-git-index fails with indexGitRepo(...): reference not found HOT 9
- zoekt-mirror-github doesn't update existing repository cache
- Error for all repos: `subrepository branch mismatch` HOT 3
- Need to exempt certain file types from being treated as binary due to trigram count HOT 1
- Error parsing regexp when escaped square brackets are quoted
- Feature request: filtering on whether code is in an archived repository HOT 1
- zoekt-indexserver: Support Per-Repository Branch Selection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoekt.