Comments (6)
I don't understand the bug report. Per
Line 122 in a75291a
the line fragment for github already uses capital L, and the Gitiles format is already as you describe,
Line 117 in a75291a
from zoekt.
Thanks Hanwen for the pointer - did some debug printing, seems like https://github.com/google/zoekt/blob/master/web/snippets.go#L116 always calls getTemplate
with f.Repository
, but the fragment map gets populated with what seems to be f.SubRepositoryName
?
In my case, f.Repository
is github.com/the-org
, while f.SubRepositoryName
is github.com/the-org/a-repo
, and fragmentmap indeed has keys from latter ones.
If that looks right, then it is a bug (should call getTemplate
with subrepo, if exists?). If doesn't look right, maybe I called the zoekt-repo-indexer
with wrong parameters?
from zoekt.
github.com/the-org
normally never is a repository, right? The REpository vs SubRepositoryName distinction is for submodules. Are you indexing submodules?
you can look at the data that controls this by looking at the .git/config file (it has the template settings, IIRC). You can also look at the end of the shard file (it should have a JSON with all metadata).
from zoekt.
Yeah, that's odd. Small repro:
$ ~/go/bin/zoekt-mirror-github -org google -name zoekt -dest repo
$ ~/go/bin/zoekt-repo-index -repo_cache repo -index idx -base_url https://github.com/google --rev_prefix= some.xml
2020/10/19 20:49:19 finished idx/github.com%2Fgoogle_v15.00000.zoekt: 1779261 index bytes (overhead 3.5)
$ ~/go/bin/zoekt-webserver -index idx
2020/10/19 20:49:42 loading 1 shards
2020/10/19 20:49:42 serving HTTP on :6070
$ curl 'http://localhost:6070/search?q=search&num=0' | grep -oi 'go#l' | sort -u
go#l
I notice that it is the result.Files
iterator f
's f.Repository
and f.SubRepositoryName
that is odd (here github.com/google
and github.com/google/zoekt
, respectively). Where is that metadata coming from? Am I invoking the indexer with the right arguments? Thanks for bearing with me.
Edit: some.xml
is:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="google" fetch="https://github.com/google/" />
<default revision="HEAD" remote="google" sync-j="4" />
<project remote="google" name="zoekt" />
</manifest>
from zoekt.
are you sure you want to use the repo indexer? Normally, you'd simply index the git repository directly, using zoekt-git-index.
from zoekt.
You are right! In retrospect, I don't know why I was using the repo-indexer. Thank you!
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
- 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.